psartor

I think my problem is security related or I broke a major design rule. I have an outlook addin that has a setup project that uses the custom setup actions as described in the two 2 articles [Deploying Visual Studio 2005 Tools for Office Second Edition Solutions Using Windows Installer (Part 1 and Part 2)]. After I got the correct prerequites installed on the test user pc it all worked. I then decided that I really needed to collect 3 paramerters from the user before executing my code in the addin. To accoumplish the parameter gathering from the user, I added a simple winform to the project. When I click the custom button on the toolbar in outlook the winform should display.

However the winform only displays when executing the code from VS 2005 when I am debugging it. If I run the installer and then start outlook 2003, the new command button displays but when clicked the winform does not display like it does in debug. That is why I think it is security related. Anyway, I have no clue as to where to go from here. Any help would be appreciated.

Thanks,

Patrick



Re: Visual Studio Tools for Office WinForm not displaying when button on toolbar in Outlook 2003 Addin clicked....

Ji Zhou ĘC MSFT

Hi Patrick,

Where did you put your form definition, in your Add-in or a different Class Library If your form is implemented in another Class Library, have you grant the full trust to that assembly

Thanks

Ji






Re: Visual Studio Tools for Office WinForm not displaying when button on toolbar in Outlook 2003 Addin clicked....

psartor

Ji,

The winfom is in the same assembly as the addin.

Patrick





Re: Visual Studio Tools for Office WinForm not displaying when button on toolbar in Outlook 2003 Addin clicked....

psartor

The problem was that I was not granting full trust to my logging dll used to write a text log file. I had given the primary addin assembly full trust but my setup project did not grant full trust to the logging assembly. So the setup utility was changed to grant full trust to all assemblies that reside in it. This is an acceptable solution as long as the assembly is used with in my company. If I was working for a company that sold software, it would be best to grant the individual assemblies full trust since I would loose control of what is placed in the application folder.

A nice support person from MS Support showed me why it was not working.


Thanks for all your help and taking the time to reply to my post.





Re: Visual Studio Tools for Office WinForm not displaying when button on toolbar in Outlook 2003 Addin clicked....

Ji Zhou ĘC MSFT

Thanks for sharing your solution. Other people with the same problem will be benefited from it J