how to hide a master on a stencil ?

B

bozood

Hi,
i want to hide a master on a custom stencil, because it's a shape th
user can't drag and drop on a page (i use it only in the code)
I tried the property hidden of the master, but i have an error messag
like 'this property is actually disable'...
I work with the Visio drawing control in a vb.net application.

Any clue is welcome.

Thanks in advanc
 
B

Bill Morein [MSFT]

This should work even in vb.net -- maybe the stencil is not open for
editing?

If you open the stencil in Visio (make sure it is the active document) then
run the following macro you should get what you want (replace the "Test"
with the names or ids of the appropriate masters):

ActiveDocument.Masters("Test").Hidden = 1
ActiveDocument.Save

This will save the stencil with the masters hidden and you can use it in you
application.

Remember that the hidden masters are still visible in the Document
Explorer -- they just are not visible in the stencil, which is probably what
you are looking for.
 

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