Custom Document Properties

When a document is part of a document-level customisation, VSTO gives the document two custom document properties.
When a document is opened, Microsoft Office checks for the two document properties and when they exist instructs the VSTO runtime to run the corresponding customisation.
The exact values of these properties depends on the version of Office the solution has been designed for.

Office 2013
A VSTO enabled file has two custom document properties
_AssemblyName - If the value is an asterisk (*) it means this file has a VSTO assembly associated with it
_AssemblyLocation - Stores the global unique identifier (GUID) of the runtime storage control. This contains the application manifest and information on where to find the corresponding assembly.

Office 2010

Office 2007
_AssemblyName - Contains the CLSID of an interface in the VSTO Loader.
This value should always be: 4E3C66D5-58D4-491E-A7D4-64AF99AF6E8B
_AssemblyLocation - Contains the file://[location]|[GUID]. The GUID is often referred to as the Solution ID.
Contains the string that provides details about the corresponding assembly or deployment manifest.
This value can contain different formst, depending on how the solution is deployed.
If the solution has been installed from a website, UNC path, USB or CD drive then it has the following format:
file://server/myshare/ExcelWorkbook.vsto | GUID

If the solution is running (or being debugged) from Visual Studio then it has the following format:
DeploymentManifestName | SolutionID | VSTOLocal
The SolutionID is the GUID that the VSTO runtime uses to identify the solution and is automatically generated when you build the project.
The Vstolocal tells the Runtime to load the assembly in the same folder as the document.

© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext