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
196 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Scott A. Helmers Partner, Harvard Computing Group Microsoft Visio MVP Background Microsoft has added more enhancements and new features to Visio 2010 than to any release since they purchased the Visio product line in 2000. In addition, the com…
David Parker’s latest book, Microsoft Visio 2010: Business Process Diagramming and Validation, will give you the tools to turn flowcharts and other business diagrams into valuable, data-driven corporate assets. Armed with the knowledge you’ll gain f…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

770 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