D
DaveMSDN123
Hi, can you please tell me how to supply a password to the
Microsoft.Office.Interop.Word.ApplicationClass.AddIns.Add() method in order
to bypass the password dialog? I have to add-in the template that contains a
macro so I can run it against my current document.
I know that I can supply a password to the
Microsoft.Office.Interop.Word.ApplicationClass.Documents.Open() method to
open the template, but then when I open the document, then try to run the
template's macro against the current document, it throws "unable to run the
specified macro", probably because the template is no longer the current
document. However, when using AddIns.Add() to load the template, then I open
the document, I'm able to run the template's macro against the current
document successfully. The only problem is that I can't supply a password to
the AddIns.Add() method, so the password dialog pops up, and that is not
acceptable.
Thanks,
Dave
Microsoft.Office.Interop.Word.ApplicationClass.AddIns.Add() method in order
to bypass the password dialog? I have to add-in the template that contains a
macro so I can run it against my current document.
I know that I can supply a password to the
Microsoft.Office.Interop.Word.ApplicationClass.Documents.Open() method to
open the template, but then when I open the document, then try to run the
template's macro against the current document, it throws "unable to run the
specified macro", probably because the template is no longer the current
document. However, when using AddIns.Add() to load the template, then I open
the document, I'm able to run the template's macro against the current
document successfully. The only problem is that I can't supply a password to
the AddIns.Add() method, so the password dialog pops up, and that is not
acceptable.
Thanks,
Dave