Solved

How to protect (via vba) vsdm shapes from changes by users who have no access to Developer tab

Posted on 2015-02-10
6
183 Views
Last Modified: 2015-02-17
My vsdm files are hidden and opened by selecting file name(s) listed in an excel sheet.
The vsdm files have several pages and many shapes, including 'intelligent' multi-shapes, all of which are derived from Template Masters in Stencils.

I want one class of user to have access to view the pages of vsdm files but to edit nothing.
However, I'm not keen on publishing pdf or web pages.

When a protected version of an editable vsdm file is made for 'view-only', it will likely be a temporary file: to be copied (on demand) from the edited version, set to 'protected', viewed by the user, and then deleted - so it never gets back into my bank of editable drawings.

My projected solution is to create a Visio.Document shapesheet variable: "User.ReadOnly", value 1 being 'protected'; 0 being 'unprotected'.

Then, via the shapesheets of every shape Master, reference the relevant 'lock..' cells within the 'shape protection' section to = DocumentSheet.Cells("User.ReadOnly").

This seems straight forward, but I'm looking before I leap. Are there gotchas waiting down the line for me? - Perhaps by referencing all of the Protection variables to DocumentSheet.Cells("User.ReadOnly") ? Or perhaps quite different solutions?

Thanks, Kelvin
0
Comment
Question by:Kelvin4
  • 3
  • 2
6 Comments
 
LVL 11

Assisted Solution

by:Visio_Guy
Visio_Guy earned 250 total points
ID: 40605228
Hi Kelvin,

If the drawing isn't kept, then why do you care what the users do to it? Are you protecting shapes as intellectual property? Do the users create data with the drawings that is input to a system, even though the drawing is discarded?

The answers above may bring up the next question: what needs to be locked down?

Shape movement?
Shape deletion?
Shape addition?
Shape formatting?

What do the users need to be able to do?

View Shape Data?
Turn layers on and off?
Move shapes?
Resize shapes?
Edit text?
Format shapes?

I suppose the lists for what needs locking, what needs to be open are actually the same!
0
 

Author Comment

by:Kelvin4
ID: 40605739
Hi Visio Guy,
Yes, to both of your questions:
Are you protecting shapes as intellectual property? - yes
Do the users create data with the drawings that is input to a system, even though the drawing is discarded? -yes

- I agree - "... the lists for what needs locking, what needs to be open are actually the same!"

My worry is that I have never set SEVERAL shapesheet.ProtectionSection.Lock cells to = 1 before, and the work to do it on multishapes is not small, so I thought I would first ask if  problems are experienced in locking multiple protection cells (problems - in the nature of something approaching unexpected / disappointing / even approaching a 'bug').  

If you have never had a problem in locking multiple shape properties, it would encourage me to go ahead, cautiously.

I'm after reassurance, or warning, or something in between!

Best regards
Kelvin
0
 
LVL 30

Accepted Solution

by:
Scott Helmers earned 250 total points
ID: 40610116
Kelvin -- I'm late to join the party and am not looking to siphon points away from Chris, but thought I'd add my two cents worth. I haven't done precisely what you're proposing but have frequently set one or more cells in multiple shapes so they derive a value from the doc sheet. Works nicely; have never had a problem.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:Kelvin4
ID: 40611720
Thanks, Scott. I'll pause awhile VisioGuy
Kelvin
0
 

Author Closing Comment

by:Kelvin4
ID: 40613875
Many thanks to both -  for first response; exploring the background; and for reassuring me.
Kelvin
0
 
LVL 11

Expert Comment

by:Visio_Guy
ID: 40613886
I agree with Scott. I can't see why setting a bunch of lock cells would cause problems. As long as you don't have lots of shapes that move based on the positions of other shapes.

Also, check out SetResults (Page or Shape) for "blasting" many cell results with one call. It should execute faster than visiting each shape.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article we’ll examine containers. We’ll explore lists (http://www.experts-exchange.com/Microsoft/Applications/M…
The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article we’ll examine lists. We’ll explore containers and callouts in separate articles. Prior to reading th…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now