Problems accessing VBE out of C# COM AddIn for Word (Error: 6068)

S

simon ryf

hey,
i made a simple AddIn for word XP, written in C# .NET. In the OnConnection
Event of the AddIn i add some Command Buttons and want to add a reference to
a *.dot for the normal.dot. i do this like that:

myRef =
wordApp.NormalTemplate.VBEProject.References.AddFromFile("c:\\test.dot");

but i get the Error 6068 which means that the Add in doesn't have the
permission to access the VBE. But the thing is that i checked the necessary
checkbox "Trust access to VisualBasic Project" on the following tab of word:
"Tools>Macro>Security> Macro Security dialog"

What else do i have to do?? is the permission only given for ONE compiled
assembly? how do i give this needed permission to my AddIn??

thanks

simon
 

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