Get Word's Trusted Locations Programmatically RRS feed

  • Question

  • Hi,

    Our VSTO Word Add-in uses a template as its UI and the buttons of template are bounded to Add-in functionalities with the help of RequestComAdd-inAutomationService.

    Word 2007 and 2010 use "Trusted Locations" concept; any file that you put in a trusted location can be opened without being checked by the Trust Center security feature.

    The VSTO add-in uses this feature and put its template in one of the Trusted Locations, and then adds it to word’s templates.

    I could not found any official resource that describes how it’s possible to get the trusted locations programmatically, but found this registry key helpful:

    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0 [Or 12.0]\Word\Security\Trusted Locations\

    Sub-keys (Location0, Location1, etc.) contain a string value (Path) which points to the trusted location.

    But unfortunately, we've seen situations where there exists a “LocationX” sub-key, with no Path value, even empty one. And at the same time, the Word itself displays a valid Path for that entry!

    Does anybody know what is the preferred way to obtain the list of Word 2007/2010 trusted locations?





    Monday, April 18, 2011 10:01 AM

All replies