0
votes

I've got a VSTO 3.0 Word Addin. Around here, they do all work off network drives (for backup reasons, etc etc).

Anyway, when I'm in the IDE, I can run my project, it automatically starts Word, i can debug, break, etc, just fine.

HOWEVER... If I compile the project, then run Word OUTSIDE of the ide, the Addin registry entry is, of course, still pointing to the NETWORK copy of the VSTO dll, not a local machine (C Drive) copy, and the addin always fails to load.

I can copy the DLL down to the local machine, update the registry to point to the C: location, and then run word and it loads fine.

But I was wondering if there's any way to config VSTO to be able to load an addin from a network share directly.

I've tried setting the "TRUSTED LOCATIONS" in Word 2010 to point to my network location, but it didn't help.

The only oddity in doing so is that the error message I get back from Word when I have VSTO_SUPPRESSDISPLAYALERTS=0, contains a path of file://j:/path/path/path, ie a mapped drive letter.

BUT, when I try to add the j:\path location to my "trusted locations" in word, it always converts it to a full pathspec, ie \domain\dfs\path\path.

I'm wondering if that mismatch is what's screwing it up, but I can't find anyway around it.

2

2 Answers

0
votes

Well, as far as I can tell, it's just not possible to load addins on a network drive without running them in the IDE. If someone comes along and knows otherwise, I'd love to know, but I'll go ahead and mark this question closed for now.

Essentially, what I've done is create a little REG script that reregisters the add in to point to the local drive, then, when I need to run as a release (ie NOT in the VS IDE), I compile, copy the dll down locally, and run the regscript. Not great, but not too bad either.

0
votes

See the registry key to enable VSTO 4 loading of network add-ins here: Installing VSTO 4.0 Causes VSTO 3.0 Addin to quit working