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
207 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visio 2013 - What is this mouse pointer? 2 430
Visio drawing in SharePoint 2010 3 231
Visio custom numbering 2 60
Visio 2010 - Linking Excel 13 114
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…
Periodically someone asks me whether there’s a way to automatically convert all of the pages in a Visio drawing to PowerPoint slides. There have even been a few times when I’ve wanted to do that myself but I never really had enough incentive to figu…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

752 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