How to: Publish a Document-Level Office Solution to a SharePoint Server by Using ClickOnce
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 2013 and Excel 2010; Word 2013 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:
Publish the document-level solution to a shared folder on your network.
Upload the document to a SharePoint document library and add the appropriate locations to the Microsoft Office trusted locations list in the Trust Center.
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
On the Build menu, click Publish SolutionName.
The Publish Wizard starts.
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
Copy the solution files from the build output folder to a shared folder on the network.
Open the solution document that you plan to upload to the SharePoint document library.
Click the File tab.
In the Info page, click Properties, and then click Advanced Properties.
On the Custom tab, in the Properties list, select _AssemblyLocation.
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:
For more information about how to format this identifier, see Custom Document Properties Overview.
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
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.
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.
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.
Click the File tab, and then click Word Options or Excel Options.
Click Trust Center, and then click Trust Center Settings.
Click Trusted Locations.
Select Allow Trusted Locations on my network (not recommended).
Click Add new location.
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.
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.