addOnName project name reference help

P

PaulV

I
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvisio02/html/vis_runadd.as
discussing changes in AddOnName for Visio 2002 it is implied that something like
menuItem.AddOnName = "myProject.module1.myProcedure
creates a menu entry for accessing myProcedure
When I do this it works as long as myProject is the active document. If myProject is a different document or a stencil, the menu entry is dimmed so it can't be accessed
Can anyone point out the error of my ways
Thanks
Paul
 
R

Reinier Post

PaulV said:
In
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvisio02/html/vis_runadd.asp
discussing changes in AddOnName for Visio 2002 it is implied that
something like:
menuItem.AddOnName = "myProject.module1.myProcedure"
creates a menu entry for accessing myProcedure.
When I do this it works as long as myProject is the active document.
If myProject is a different document or a stencil, the menu entry is
dimmed so it can't be accessed.
Can anyone point out the error of my ways?

My first hit on Google for "AddOnName" (YMMV) gives me the document

http://msdn.microsoft.com/library/en-us/devref/HTML2/DAR_Properties_(A)_373.asp

with the closing paragraph

Note Beginning with Microsoft Visio 2002, the AddonName property
cannot execute a string containing arbitrary VBA code. Code that was
formerly passed to the AddonName property can be moved to a procedure
in a document's VBA project that is called from the AddonName property.

See the archives of this newsgroup for more discussion.
 
P

PaulV

Reinier
The comment in the reference document..
(you must have explicitly set a reference to projName in your Visual Basic project
was the key for the problem I was having. I had not done that. Once I did, I was OK
Thanks
Paul
 
R

Reinier Post

PaulV said:
Reinier,
The comment in the reference document...
(you must have explicitly set a reference to projName in your Visual
Basic project)
was the key for the problem I was having. I had not done that. Once I
did, I was OK.
Thanks.
Paul

Welcome. It took me quite a while to figure this out myself.
 

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