dotNet Add-iIn for Word 2003 doesn't load

D

Daniel Oliveras

I wrote an Add-In for Word 2003, but when I deploy that Add-In in a client
computer the Add-In doesn’t’ load when you run Word 2003.

I installed these components in the client machine, in that order:

1.- .NET Framework 2.0
2.- Microsoft Office Professional enterprise 2003.
3.- Primary Interop Assemblies for Office 2003.
4.- Visual Studio Tools for Office Runtime 2005.

In the same machine I installed a word template with some .net 2005 code, a
panel and some other functions, and this template run with no problem.

I forgot something? I must modify some security policy in Word 2003?

Thanks for your help.
 
P

Peter Huang [MSFT]

Hi,

I think we may try to make sure the .NET assembly(addin) is trusted.
Secure and Deploy Business Solutions with Microsoft Visual Studio Tools for
Office
http://msdn.microsoft.com/msdnmag/issues/04/03/ToolsforOffice2003/

Also you may to set the Office Macro security level to low so that we can
isolate the problem via Tools/Macro/Security.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

Daniel Oliveras

Hi Peter,

I modified the security policy of the client machine to grant FullTrust to
the Assembly, but the problem persists, Word simply ignores the Add-In.

The strangest thing is that in the same machine I am running some solutions
created with VSTO 2005 and these documents run correctly.

The add-In simply adds a menu in the word menu bar and an Icon bar, no
smartags or other things.
 
P

Peter Huang [MSFT]

Hi

Commonly the VSTO projects are somewhat different from the Addin projects.
The VSTO can be considered as a .NET version "VBA" code.
Because all the .NET code will be forced to do security check(CAS), that is
why I suggest you config the CAS for the Addin.

Also I think you may try to use the App.config file to make sure the .NET
addin running under .NET 2.0 framework, if there are both 1.1 and 2.0
installed there may have some confusion.
We can use a <supportedRuntime> Element in the winword.exe.config file and
put it into the directory where winword.exe is to make sure the winword
will load .NET 2.0.
<supportedRuntime> Element
http://msdn.microsoft.com/library/deu/default.asp?url=/library/DEU/cpgenref/
html/gnconSupportedRuntimeElement.asp

Also to troubleshooting the problem, I think you may try to add trace code
into your application to see what is the cause.
e.g.
In the very beginning of the Onconnection method, add a code line to write
a message into a log file to make sure the addin has been successfully
loaded.
Also you may try to enbrace all your Addin code in try...catch blocks.
And in the catch statement to write the error into a file, so that we will
have more information to troubleshooting the problem.
e.g.
OnConnection
{
try
{
}
catch()
{

}
}

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top