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
Okay, I tracked this down to the (Default) value of the InprocServer32 key in the registry.

When VS creates the registry entry during a build it uses a REG_SZ value, but apparently my target testing workstation will not load the addin unless the (Default) is a REG_EXPAND_SZ type in the installer.

This particular value, BTW, is the one set to "C:\Program Files\Common Files\Microsoft Shared\VSTO\8.0\AddinLoader.dll" Obviously if that value can't be processed your addin won't load.

I'm happy to report that I do have both addins installing in a single MSI, to the same directory, and using the same CAS strongname entry. I updated my launch conditions to check the VSTOR for the Update DWORD value, which indicates that VSTO SE is installed. This seems to run without the Shared Addin update, which is not a part of our standard desktop config. I will continue to test, and if the Shared Addin update is necessary I will let you know.

Thanks for the help.
Posted 19 Jan, 2007 18:29:51 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
It's a good news. Please let me know if you need anything else.
I will help.
Posted 19 Jan, 2007 19:16:18 Top
Rick Koch




Posts: 172
Joined: 2006-09-05
Sergey, I'm suddenly getting security prompts. I have not changed the way I'm creating any objects. The prompts may be related to this change, because it seems to occur when I open a Wordmail inspector to reply to a message.

If I run both addins like this, will any of the Word addin threads pose a security problem for the Outlook addin?

This is the method that's triggering the prompts:

public static string GetOutlookItemType(object OutlookItem)
{
try
{
CosmosAddinLog.Info("Beginning GetOutlookItemType().");
if (OutlookItem is Outlook.MailItem)
{
CosmosAddinLog.Info("Item is a MailItem.");
return "MailItem";
}
else if (OutlookItem is Outlook.ContactItem)
{
CosmosAddinLog.Info("Item is a ContactItem.");
return "ContactItem";
}
else if (OutlookItem is Outlook.AppointmentItem)
{
CosmosAddinLog.Info("Item is an AppointmentItem.");
return "AppointmentItem";
}
else if (OutlookItem is Outlook.MeetingItem)
{
CosmosAddinLog.Info("Item is a MeetingItem.");
return "MeetingItem";
}
else if (OutlookItem is Outlook.TaskItem)
{
CosmosAddinLog.Info("Item is a TaskItem.");
return "TaskItem";
}
else
{
CosmosAddinLog.Info("Item is not a supported Outlook item type.");
return "Unsupported";
}
}
catch (System.Exception Ex)
{
string errMsg = "Unhandled exception in GetOutlookItemType().";
CosmosAddinLog.Error(errMsg, Ex);
throw;
}
}


This method is in my Outlook addin's ThisApplication.cs, and it's being called by the ADXModule's InspectorActivate event.
Posted 22 Jan, 2007 18:49:41 Top
Sergey Grischenko


Add-in Express team


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

I tested the code and I didn't get any security warnings. Are you sure that the code above is responsible for the warnings?
Posted 23 Jan, 2007 09:07:24 Top
Rick Koch




Posts: 172
Joined: 2006-09-05
Yes, the code is called from the ADX on the activate event. The call goes into the Outlook addin's ThisApplication.cs. The last log entry I get before the prompt is "Beginning GetOutlookItemType()."

If the user tries dismissing the prompt, it pops back up as soon as the focus returns to the inspector. After several iterations of this, all the entries in the debug.log show "Beginning GetOutlookItemType()."

Note that the app was started under VSTO 2005, and that I upgraded to SE to add the Word addin. The Outlook addin has a ThisApplication module, while the Word addin has a ThisAddin module. All files are deployed to the same directory. We are using ADX module 2.7.2389 (I call my object ADXWrapper instead of ADXModule.)

Note that the failing method is static, in the OutlookAddin.ThisApplication, called from ADXWrapper.

I'm in the field at the moment, but I've got a request to have it tested with the Word addin disabled.

One thing I can't figure is how the model guard would be affected by these "is" statements. I was wondering about changing the method to use "as" casts to see if it works any differently.

I hate the Object Model Guard.
Posted 23 Jan, 2007 12:32:17 Top
Rick Koch




Posts: 172
Joined: 2006-09-05
Did you actually build an installer and install it to a non-developer worksta? I'm not sure you can really test it otherwise.
Posted 23 Jan, 2007 14:00:43 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Rick, I am afraid I can't reproduce the issue. I need your project. Can you please send me the add-in project? I will try to help.
Posted 24 Jan, 2007 07:44:19 Top
Rick Koch




Posts: 172
Joined: 2006-09-05
This may be a false alarm. I'm trying to confirm, but it sounds like systems rolled out an Office upgrade that conflicted with other security settings on the morning we got the errors.

I've been playing with it throughout the day on non-developer machines, and I have not seen the security prompts.

I will let you know when I confirm, but I appreciate the prompt assistance.

Rick
Posted 29 Jan, 2007 17:16:43 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
OK. Please send me the project if you get the warnings again.
Posted 30 Jan, 2007 09:15:25 Top