How to: Publish a Document-Level Office Solution to a SharePoint Server

You can use Microsoft Office SharePoint to publish your document-level solutions to end users. When users go to the SharePoint site and open the document, the runtime automatically starts to install the solution from the shared network folder. The customization will continue to function even if the document is copied elsewhere, such as the desktop.

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.

To prepare the solution to be distributed from SharePoint, you must do two things:

  1. Publish the document-level solution to a shared folder on your network.

  2. Upload the document to a SharePoint document library and add the appropriate locations to the Microsoft Office trusted locations list in the Trust Center.

link to video For a video version of this topic, see Video How to: Deploy a Document-Level Office Solution to a SharePoint Server (2007 System).

Publishing a Document-Level Solution to a Shared Location

Use the Publish Wizard to publish the solution to the shared folder and automatically update the deployment manifest path in the document. Alternatively, you can perform these steps manually.

To publish a document-level solution to a shared folder on a network 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 to a shared folder on the network.

    If you want the wizard to copy the solution files to the network folder, set the default installation path on the second page of the wizard to the shared folder location.

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

To publish a document-level solution to a shared folder on a network manually

  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 upload to the SharePoint document library.

  3. Click the File tab (for Excel 2010 or Word 2010) or the Microsoft Office Button (for Excel 2007 or Word 2007).

    In the Info page, click Properties, and then click Advanced 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.

Uploading the Document and Adding the SharePoint Server Location to the Trust Center

To make the document available to end users, upload it to a SharePoint document library. Before users can run the solution, they must grant trust to the SharePoint location inside of Microsoft Office Word or Excel, or a system administrator must set the policy remotely.

To add the SharePoint server location to the Trust Center

  1. Add the solution document to a document library on a SharePoint server.

    For more information, see Upload a document in the SharePoint Server documentation on Microsoft Office Online.

  2. Open Word or Excel on the computer on which you want to run the solution.

    You do not need to have a document open. The remaining steps add the SharePoint server to the Trust Center in Word or Excel for that computer only. Because the document is in a network location, this must be done on every computer that will run the solution.

    Note

    System administrators can use the Office Configuration Tool to set these policies remotely. For more information, see Security policies and settings in the 2007 Office system.

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

  4. Click Trust Center, and then click Trust Center Settings.

  5. Click Trusted Locations.

  6. Select Allow Trusted Locations on my network (not recommended).

  7. Click Add new location.

  8. In the Path box, type the URL of the SharePoint server, for example http://SharePointServerName/TeamName/ProjectName/DocumentLibraryName. Do not add the name of the default Web page, such as default.aspx or AllItems.aspx.

  9. Click OK.

    To test the installation process, uninstall the customization from your computer, and then open the document from the SharePoint site. After the document opens, the customization will be installed. Copy the document to your desktop. The customization will still run because the _AssemblyLocation property contains the full path to the file share.

See Also

Tasks

How to: Publish an Office Solution by Using ClickOnce

How to: Uninstall a ClickOnce Office Solution

Concepts

Granting Trust to Documents