Visio 2013, Macro in Visio 2010 file

Started by novski, May 18, 2015, 07:30:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

novski

Hi
I just been forced to change to Visio 2013 by my Company. So i have to change all Templates.
I read about the changes and made some tests.
I found out that there was some kind of changes regarding the Macros but i don't understand what that actualy means, because i have a Macro that i start from the Developers tab (to make all Pages get the same Printsize).
But that Macro seams to stay in the Dokument even if i save as .vsdx and confirm the warning that all macros are get lost if i don't save it in a macro enabled way like .vsdm.

So where is the difference?

can somebody explane me that just a bit deeper?

Thanks
Novski

JohnGoldsmith

There's nothing to stop you adding some code to a vsdx, and running it - you just can't save it.  If you what to persist code in your files then you need to save in one of the code formats ('macro-enabled'):

       
  • .vsdx (Visio drawing)
  • .vsdm (Visio macro-enabled drawing)
  • .vssx (Visio stencil)
  • .vssm (Visio macro-enabled stencil)
  • .vstx (Visio template)
  • .vstm (Visio macro-enabled template)
You could still have a .vss or .vssm stencil (containing code) that opens with a non-code template (.vstx), which is probably good way to go in any case as you don't really want multiple versions of your code floating about in drawing documents based on your templates that included code.

Does that help?

Best regards

John


John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

novski

Hi John
I just found out why i wasn't able to reproduce that.
If i save my file from .vsd to .vsdx the macro stays in the document as long as i don't close it.
It disapears only after closing and a reopening of the file. That seams weard to me.
Maybe someone else can try to reproduce that at a other side?

Thanks for the full explaination of the Endings...
Best Regards
Novski

JohnGoldsmith

Hi, 

Well I agree that you might expect to see the VBA project to disappear when you save it as vsdx, but on the otherhand, at that stage, even though the Save may have generated a (vsdx) file, you're still just dealing with the document in memory in your current session. 

It's simply that the code can't be persisted in the vsdx format, so when you close the drawing and reopen it no code is available.

I think this adds up even if the dialogs suggest that the code is about to disappear.

Best regards

John
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/