Add VB Reference

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm looking for code to add a reference to the Microsoft Outlook library. I
think its something like:

ThisWorkbook.VBProject.References.AddFromFile
or
ThisWorkbook.VBProject.References.AddFromGuid

but I can't figure out the final portion to actually add the reference. Or
perhaps there's a better way...

Any help is appreciated. Thanks,
Chad
 
when i run this i get the following run-time error: "Programmatic access to
Visual Basic Project is not trusted"

any thoughts? thanks.
 
Tools=>Macro=>Security, Trusted Publishers Tab, click the appropriate
checkbox(s) in the lower left corner.
 

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

Back
Top