Visio Guy

Visio Discussions => Visio 2013 Issues => Topic started by: stugol on December 15, 2012, 02:05:20 AM

Title: Unable to save password protected macros?
Post by: stugol on December 15, 2012, 02:05:20 AM
Hi, I have a template with macros that is password protected and created in Visio 2010, and the user can't open the codes as it's password protected.

When opened in Visio 2013, everything works well, but if saved in .vsdm or even exported or saved in "Visio 2003-2010" format, the entire code module is clean, gone, nothing, unprotected. All codes are lost. Is it just me or am I doing anything wrong?

If I unprotect the code modules, Visio 2013 saves into .vsdm files fine. Can't seem to find any google answers, so any help will be much appreciated.
Title: Re: Unable to save password protected macros?
Post by: aledlund on December 15, 2012, 12:53:55 PM
I'm using the rtm v2013. I added vba code to a new document, attempt to save as vsdx and it fails because it recognizes that code is embedded and tells me to save as vsdm. I save as vsdm (complete's successfully). I then re-open the file vsdm file and the code is there.
I then attempt to save as a vsd and get the compatibility warning, continue the save. re-open the vsd file in v2013 and the vba code is there.  Open the vsd file in v2010 and get a (valid) security warning about macros - select enable content - the code is in the document ane executes correctly.
short answer - limited testing works on my system
al
Title: Re: Unable to save password protected macros?
Post by: stugol on December 15, 2012, 03:15:23 PM
Thanks aledlund for the reply but alas, the critical word here is "password protected".

1. Create a template with some codes and password protect the codes in V2010.
2. Open the file in V2013. Everything's OK at this point.
3. Save the file as vsdm. Still OK.
4. Re-open the vsdm file and all codes are gone.

If your codes are not password protected, everything works fine. I have at least 2 users / system that is able to duplicate the problem.
Title: Re: Unable to save password protected macros?
Post by: aledlund on December 15, 2012, 04:52:38 PM
afaik there is no password protect as a standard feature in v2010. How do you accomplish that?
al
Title: Re: Unable to save password protected macros?
Post by: stugol on December 15, 2012, 10:23:19 PM
1. Press F11 to open vba.
2. Right click on your file name & select properties.
3. Select the right most tab, and choose protect, and add password.

Hope that helps.
Title: Re: Unable to save password protected macros?
Post by: aledlund on December 16, 2012, 01:38:40 AM
First, thank you very much for this. I was able to recreate it without building a template file
read protected vsd into v2013
save as v2013 vsdm (protection remains and vba is ok)
save as v2010 vsd, vba disappears and is unprotected.

I'll pass it along but I strongly suggest that since my feedback is not a formal bug report, that you (or your clients) open a forma report with MS.
thanks again,
Al
Title: Re: Unable to save password protected macros?
Post by: stugol on December 16, 2012, 02:02:54 PM
Thanks Al, so it's not just me. Are there a specific way I can submit a bug or should I do it through the forums? Thanks in advance. By the way, for me, the first save as vsdm is also problematic,  it work well when you save it but close and reopen it and all codes are gone.
Title: Re: Unable to save password protected macros?
Post by: aledlund on December 16, 2012, 04:01:52 PM
Based on this "Although Visio 2013 RTM is available to MSDN TechNet subscriber, it's not general available yet.", the support for v2013 isn't really defined yet. You might start over here

http://support.microsoft.com/common/international.aspx?RDPATH=%2foas%2fdefault.aspx%3fGprid%3d937%26st%3d1%26wfxredirect%3d1%26sd%3dgn

I didn't try to see if v2013 is in the list, but since your scenario involves v2010 you might try that.
hth,
al
Title: Re: Unable to save password protected macros?
Post by: stugol on December 19, 2012, 02:31:10 AM
Got a reply from Microsoft forum saying the inability of V2013 to save protected macros is a "feature". Therefore if you are one of the millions of developer out there who uses password protection for their codes, will all lose the ability of their software to function in V2013 unless they open up their codes, and even then, the user has to specifically ke in the password to ensure that the software continues to work.

Huh? Your comments or suggestions are most welcome at this point.
Title: Re: Unable to save password protected macros?
Post by: Jumpy on December 19, 2012, 12:54:50 PM
It's not a bug, it's a feature...

Where have I heard this one?  :)
Title: Re: Unable to save password protected macros?
Post by: aledlund on December 19, 2012, 03:13:27 PM
Makes you just sit there and shake your head in amazement...
al
Title: Re: Unable to save password protected macros?
Post by: Paul Herber on December 19, 2012, 03:27:32 PM
Quote from: stugol on December 19, 2012, 02:31:10 AM
Got a reply from Microsoft forum ...

Which forum was this?
Title: Re: Unable to save password protected macros?
Post by: stugol on December 20, 2012, 12:37:28 AM
This one: http://social.msdn.microsoft.com/Forums/en-US/officedevpreview/thread/d4726ade-9c54-4ce8-bdec-2465dcb902ec
Title: Re: Unable to save password protected macros?
Post by: aledlund on December 21, 2012, 12:23:54 PM
this isn't over yet,
al
Title: Re: Unable to save password protected macros?
Post by: aledlund on December 21, 2012, 08:29:27 PM
Stugol,
It's been reviewed and logged as an issue. It still needs to be formally entered with a ticket through the support organization.
hth,
al
Title: Re: Unable to save password protected macros?
Post by: stugol on December 22, 2012, 01:26:41 AM
Thanks al, I will get it done through the link you provided.