Wordmail toolbar showing in Word

Add-in Express™ Support Service
That's what is more important than anything else

Wordmail toolbar showing in Word
 
Rick Koch




Posts: 172
Joined: 2006-09-05
Thanks, I have installed the SE release, and adapted this code to create a Word addin that removes the the Outlook addin controls.

I note that when I open a Wordmail editor it adds the Outlook toolbar to an open Word window, but the toolbar is removed again as soon as the Word window is activated. I guess this is the best we're going to get?

Also, what is the purpose of the BeforeUninstallControls event, and why are you deleting Outlook addin buttons during this event? What's the difference if we leave the buttons there?
Posted 11 Jan, 2007 14:36:07 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Rick.

In the event handler I remove the Outlook button that remains in Word application. Otherwise the button will appear in Word after the add-in is uninstalled.
Posted 12 Jan, 2007 10:27:38 Top
Rick Koch




Posts: 172
Joined: 2006-09-05
Clarification:

So, this is a Word addin that neutralizes the buttons added by an Outlook addin, such that the Outlook controls aren't displayed inside Word?

And the BeforeUninstallControls event fires when the Word addin is uninstalled, at which time it removes the Outlook controls from Word. Of course, if the Outlook addin is run after the Word addin is uninstalled, then the Outlook buttons will be re-added to Word, right?

Last question: I note that I'm receiving prompts regarding my normal.dot template. How should I respond to these prompts? Do these prompts occur only the first time I run the addins, or will I be prompted indefinitely?
Posted 12 Jan, 2007 11:51:09 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Yes, correct.

Last question: I note that I'm receiving prompts regarding my normal.dot template. How should I respond to these prompts? Do these prompts occur only the first time I run the addins, or will I be prompted indefinitely?

Actually you shouldn't get any prompts regarding the normal.dot template.
What prompt do you get? Do you open Word with an empty document and then you see the message regarding the normal.dot ?
Posted 12 Jan, 2007 12:40:14 Top
Rick Koch




Posts: 172
Joined: 2006-09-05
Okay, I'm trying to bundle this Word addin into my Outlook addin installer, but only the Outlook component is loading. Any thoughts?
Posted 16 Jan, 2007 18:46:11 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Rick.

Did you add registry entries for the Word add-in in the Registry editor of the setup project?
You can also create an .msm module for Word add-in and add it to the installer of the Outlook add-in.
Posted 17 Jan, 2007 09:48:23 Top
Rick Koch




Posts: 172
Joined: 2006-09-05
Yes, I added the registry entries to the installer.

Note that the Outlook addin was originally developed with VSTO 2005 and has a ThisApplication class, while the Word addin was developed with VSTO 2005 SE and has a ThisAddin class.

I have confirmed that the Word addin will not run following installation on either my developer workstation or the virtual test machine. Both machines have the VSTO 2005 SE Runtime installed.

The Word addin adds two files (a DLL and a manifest) to the solution. It runs fine in the debugger, and runs fine outside the debugger following a "build" operation. It only fails when running Word after the installer.

I have the installer putting these Word addin files in the same folder as the Outlook addin.

My CAS strategy is to register internal files with a single strongname (key only, no file or version dependency). Since the Word addin uses the same key, and installs to the same directory as the rest of the application code, it shouldn't require any CAS changes.
Posted 17 Jan, 2007 15:03:48 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Rick, did you add custom actions for the Word add-in in the setup? I mean that you should grant access to the add-in in the '.NET Configuration' dialog of the Control's Panel.
Posted 17 Jan, 2007 16:10:28 Top
Rick Koch




Posts: 172
Joined: 2006-09-05
My CAS strategy creates a top-level code group oriented to the URL of the target directory. This group has no permissions.

Within that code group are sub-groups for each strongname in the addin. These groups have full trust permissions. The groups are based upon the keys, and are set using the no filename and no version options. So only one sub-group is necessary for each strongname key. Note that the Outlook addin uses the same key file as the Word addin, and it's working fine. Since the Word addin is in the same directory and has an identical strongname, it should have full trust permissions as well.

I built this security by adapting portions of MSDN's SetSecurity sample app, which uses CASPOL. I build the subgroups with a routine that runs against one specified file from each publisher, including the Add-in Express DLL. It runs during install, and as I've said, the Outlook addin loads just fine.

One thing I've noticed is that the LoadBehavior on the Word addin is sometimes changed from 3 to 2. There are no indications in Word that the addin is supposed to load, no indication that it's disabled. I have VSTO_SUPPRESSDISPLAYALERTS=0 in my environment, but I am not getting any exceptions. I can't see any messages in any of the logs in the event viewer.

Is there any way to get additional debug information from Word during startup? I'd sure like to know if it's trying to load my addin.
Posted 17 Jan, 2007 18:08:24 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Rick, did you include the 'Shared Add-in Support Update for .NET Framework 2.0' prerequisite to the setup project? If no, it may cause the Word add-in is not loaded on the user's PC.
Posted 18 Jan, 2007 10:36:21 Top