F
fss
I have created several Visio drawing templates (.vst) which display with thumbnail images in the “Choose File Type…†window. These images are metafile (.emf) format and are selected in the PreviewPicture property in the VBA editor.
There are two problems I am having
1. Every time I make changes to the templates, I have to reselect the PreviewPicture property in the ThisDocument properties window before saving the template or the thumbnail will be blank the next time the “Choose File Type…†window is opened. Visio doesn’t seem to remember the image file when the template is reopened and resaved.
2. The more serious problem is that in order to select the PreviewPicture property, VBA and VBA project creation must be enabled. It appears that just having a VBA project in the templates flags the templates as containing untrusted code, even though no code modules have been added. I have tried setting the property, disabling VBA, and then saving, but this does not remove the macro warning. I have chopped out the VBA project by saving the templates in XML format (.vtx), editing the text, and then retrieving the XML file in Visio and resaving it as a .vst file. This works to remove the VBA project, but the image is missing again because the XML file had to be opened and saved in Visio without reselecting the PreviewPicture property. My best alternative so far is to sign the project in each template to get rid of the macro warning. This works, but it doesn’t make sense to sign a project that doesn’t contain any code
Please help me break me out of this endless loop
There are two problems I am having
1. Every time I make changes to the templates, I have to reselect the PreviewPicture property in the ThisDocument properties window before saving the template or the thumbnail will be blank the next time the “Choose File Type…†window is opened. Visio doesn’t seem to remember the image file when the template is reopened and resaved.
2. The more serious problem is that in order to select the PreviewPicture property, VBA and VBA project creation must be enabled. It appears that just having a VBA project in the templates flags the templates as containing untrusted code, even though no code modules have been added. I have tried setting the property, disabling VBA, and then saving, but this does not remove the macro warning. I have chopped out the VBA project by saving the templates in XML format (.vtx), editing the text, and then retrieving the XML file in Visio and resaving it as a .vst file. This works to remove the VBA project, but the image is missing again because the XML file had to be opened and saved in Visio without reselecting the PreviewPicture property. My best alternative so far is to sign the project in each template to get rid of the macro warning. This works, but it doesn’t make sense to sign a project that doesn’t contain any code
Please help me break me out of this endless loop