Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
241 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 1000 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 31

Accepted Solution

by:
Scott Helmers earned 1000 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

A recent Visio zone question asked how to use the data in an Excel file to create a Visio Gantt chart -- and then to dynamically update the Gantt chart. The good news is that the Viso Gantt Chart wizard can be automated. The bad news is that the…
Book Review: Using Microsoft Visio 2010 by Chris Roth   Disclaimer: The author of Using Visio 2010 is a friend and fellow Visio MVP. Whether you’re new to Visio or are upgrading to Visio 2010 from a previous version, you will find a lot to like…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Suggested Courses
Course of the Month11 days, 8 hours left to enroll

916 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