Share via


How to: Publish Template Solutions That Run Code on a Network

Template solutions are built with a relative path to the customization, unless you take steps to change the path. If the customization is stored in a network location, you must change a custom document property to include a full path to the deployment manifest on the network.

Applies to: The information in this topic applies to document-level projects for the following applications: Excel 2007 and Excel 2010; Word 2007 and Word 2010. For more information, see Features Available by Office Application and Project Type.

You can update the custom document properties in several ways, including the following:

  • Use the Publish Wizard to publish your solution.

  • Change the properties in the Word or Excel application user interface (UI).

  • Change the path in the Setup program.

  • Use the API that is described in the Open XML Format SDK.

Using the Publish Wizard

Use the Publish Wizard to publish the solution and automatically update the deployment manifest path in the document.

To specify the full path by using the Publish Wizard

  1. On the Build menu, click Publish SolutionName.

    The Publish Wizard starts.

  2. Follow the steps in the wizard to publish the solution.

  3. On the second page of the wizard, set the default installation path to the shared folder location.

    For more information, see How to: Publish an Office Solution by Using ClickOnce.

Using the Word or Excel UI

You can update custom document properties in the application UI.

To change the property values in the application UI

  1. Copy the solution files from the build output folder to a shared folder on the network.

  2. Open the solution document that you plan to deploy to your users.

  3. Click the File tab (for Excel 2010 or Word 2010) or the Microsoft Office Button (for Excel 2007 or Word 2007), point to Prepare, and then click Properties.

  4. Click Document Properties, and then click Advanced Properties.

  5. On the Custom tab, in the Properties list, select _AssemblyLocation.

  6. In the Value box, there is a deployment manifest identifier already present. At the beginning of the identifier, type the fully qualified path of the deployment manifest followed by a bar, in the format path|identifier.

    As an example, the path could look like this:

    \\servername\foldername\filename.vsto|74744e4b-e4d6-41eb-84f7-ad20346fe2d9

    For more information about how to format this identifier, see Custom Document Properties Overview.

  7. Click OK, and then save and close the document.

Using the Setup Program

You can modify the installation path in the Setup program from the Command Prompt window, without using Visual Studio. When the installer runs, it uses the updated value. For more information, see How to: Change the Installation Path of an Office Solution.

Using the Open XML Format API

Documents in the 2007 Microsoft Office system use the Open XML Format as the default file format. You can manipulate Open XML files by using the API.

To access custom document properties by using the API

See Also

Tasks

How to: Publish an Office Solution by Using ClickOnce

How to: Uninstall a ClickOnce Office Solution

Concepts

Granting Trust to Documents