Updating a template

Started by davidgon, April 25, 2017, 04:06:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Hello everyone!  :D

I have created a template with VBA code, and when I am working with it, the shapesheet of the shapes, pages and document change. The point is that I am going to keep changing the template, so there will be new versions. The problem is how to update the template.

If I am starting a new project, I use the new version and there is no problem, but if I am working in a project, how could I update the template without losing all the information I have? There's any way to copy all the information from one template to the other one?

Other possibility is to make an AddIn. I think it would work better, but I don't know exactly how to do it. Is it too complicated?

Thank you!


Store your macros in a stencil, not the template.

Hey Ken


   I constantly face a similar situation where I need to disseminate not only macros, but also custom shapes and more, and keep them up to date with occasional updates.  I agree with Yacine: I've found that using the stencil as a central repository is a fine solution, and much more flexible than templates.  Rather than having users copy their drawings to a new template, or update macros in a thousand ThisDocuments, everything is in only one place.  I just distribute the new stencil and have the users copy it to the My Shapes folder that Visio builds for every user.  It even auto-updates the user's drawings when they open the new stencil.

   For more detail regarding how I do it (and the one challenge I encountered), check out this earlier post: http://visguy.com/vgforum/index.php?topic=4710.msg19190#msg19190

   Good luck!

   - Ken
Ken V. Krawchuk
No Dogs on Mars - A Starship Story


Thanks, something like that is what I was looking for. Two questions:

Have I to change all my ThisDocument and similar references in the vba code in order to the application works?

I have in the Document some xml code for adding some new ribbon buttons. How should I refer the code of the macros of those buttons to the stencil?

I don't know if I explain myself...

Thanks again!