How to add a preview to a template
So, you've created a stencil and template for Visio and now you've also got it installed in Visio by creating an installer (.msi) for it. The problem is that the template just shows in Visio as a blank sheet. How do you get the images that appear with Microsoft's built-in templates?
Step 1 - Setting up Visio
Right, the first thing you need to do is start Visio, go to the Options -> Advanced dialog, and ensure that
"Ensure all settings put in Windows registry" is set, close Visio,
Step 2 - Choose your image
Next you need to determine what image you want to add to the template, I've chosen:
Step 3 - Open the template
Start Visio, then menu File -> Open, navigate to where the template (.vst or .vtx) is stored, select the file, and click Open.
Step 4 - I get the picture!
Now find the document from where you want to paste your image, select and copy it. Now paste or insert it into the
open template and set its size and position. If you are working with templates for US and metric then its best to be comsistent with the
size and position.
Step 5 - Cleaning up
Now set LockPreview=TRUE, then close the shapesheet editor.
Step 6 - Build your installer
Now rebuild and run your installer, you should end up with this:
Job done. Sweet!
P.S. These instructions are for Visio 2003/2007. If you have a later version of Visio using the ribbon the menu options will be different.
Thank you for this tutorial. I have downloaded a couple free stencils that didn't have a template file with them or a preview picture, so I was trying to create my own for organizational purposes. Could not find an example until I found a link you posted in a forum. Worked great. Too bad I don't have the tools to create a non blurred graphic, but that's OK. Much better than what I have.
Unfortunately setting LockPreview to TRUE doesn't seem to work in Visio 2013. I reverted to an earlier version of Visio to add template previews.
Add comment on this article