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
191 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Have you ever created a custom Visio stencil – a collection of your own unique master shapes – and then created a drawing by dragging masters onto the drawing page? Have you then made changes to the stencil master and wondered why the shapes on the …
Meetings to discuss business process can waste time, and often do .  The meeting's dialog can get confusing when participants have different professional perspectives and backgrounds.  A jointly-developed process picture helps wade through the confu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

867 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

12 Experts available now in Live!

Get 1:1 Help Now