Visio Guy

Visio Discussions => Programming & Code => Topic started by: matthew on July 22, 2020, 06:09:51 PM

Title: Save to another Visio file
Post by: matthew on July 22, 2020, 06:09:51 PM
Can someone tell me how to save my .vsdm file as another Visio file without the code while keeping the coded one open?  Also, when saving the other file how do I know if I can save it as a .vsdx file?
I was hoping I could use .SaveCopyAs but I get the error message 'method or data member not found'.  [ThisDocument.SaveCopyAs (thisPath)]
Any advice would be much appreciated.
thanks
Title: Re: Save to another Visio file
Post by: vojo on July 23, 2020, 02:06:21 PM
FWIW, savecopyas in Excell is tricky...you have to get all the parameters just right to work.
So may want to make real sure you understand the syntax

Since in VBA, you could make your own macro to copy to new file then close that one while leaving master open.
you would create new file, do the copy, save the copy, then close.
its been a few years since that excel project but I believe I did it this way.

BTW, if others are going to use this, you to make sure the security is set up (VBAproject, check settings on new machine, etc)
Title: Re: Save to another Visio file
Post by: wapperdude on July 23, 2020, 04:59:30 PM
The quickest way that occurs to me...
1) delete the macros
2) do saveas vsdx.
3) close the vsdx.  You may have to re-open the vsdm, but it will be unchanged.

Ed.:  as I think about this(not @ my computer), if you just do a Save As vsdx, Visio issues a warning.  You have option to proceed with the vsdx, I believe, and macros are either gone or inoperative. 
Title: Re: Save to another Visio file
Post by: matthew on July 26, 2020, 11:59:00 AM
thanks for both replies, I'll try both and see what is best for me.
much appreciated,
kind regards
Matthew