Document loses reference to stencil with code

J

Jacco

Hi All,

I have created a stencil that contains a number of shapes and all the
code that I need for a specific plugin I have created (swipr, check
out at swipr.com, it's open source). Now I have also created some code
to create a menu item to call some of the functions in the stencil.
The menu is created, but all items are greyed out. You will first have
to set a reference to the stencil in the development environment (alt-
F11, Tools->References), and then all menu options work fine.

Sometimes, this reference persists (as i would expect it would), so
after saving and re-opening the document, the menu is created and the
items are all available. But more often, the entries are again greyed
out, and i need to set the reference back on again.

Is there a solution for this? Am I missing something? And more
importantly, is there a way to programmatically set the reference?
(The name of the stencil is known, so is its locations).

Thanks for all your help!

Jacco
 
J

JuneTheSecond

Yes, you can make reference in your program.
Check the reference object in VBA help.
But your program will access to the project, the seculyty level should be
lowered.
 

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