Stencil Protection

M

Martin

Hi all,

I recognized that it is not possible to edit "built-in" stencils of
Visio like the "Cross-functional Flowchart Shapes Horizontal". I really
like that mechanism cause it avoids changes made by the user to "my"
stencil.

I searched a bit within this newsgroup but did not find an answer.
Perhaps "you" can tell me how to "activate" this for my stencils.

PS: I do not mean the "read only" mechanism. This could be easily
disabled just by dragging a shape onto the stencil and confirm the
warning message.
 
J

Josef Meile

Hi Martin
I recognized that it is not possible to edit "built-in" stencils of
Visio like the "Cross-functional Flowchart Shapes Horizontal". I really
like that mechanism cause it avoids changes made by the user to "my"
stencil.
I found a way of doing this: Create a new visio drawing, copy and paste the
following in the visual basic editor:

Sub ProtectStencil()
Dim stencil As Document

Set stencil = Application.Documents("stencilName.vss")
stencil.Protection() = visProtectMasters
End Sub

Open the stencil you want to protect, replace "stencilName.vss" for the real
name,
enable the "Edit Stencil" flag, and run the macro. There is only a problem, an
experienced user may also use the same script for disabling the protection.

By the way, I also saw that you can also modify built-in stencils: Close all
documents, open a built-in stencil, and double click a master. So, there
isn't a real
protection mechanism.

Regards
Josef
 

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