Use my own template and Stencil

Started by john.monroe, April 30, 2013, 08:09:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

john.monroe

I am uisng your VBA Code to modify a Visio Diagram.  I want to use my own template.
Const FlowchartTemplateName$ = "c:\temp\visio\OCUdefaultFTDRTemplate.vst"
Const FlowchartStencilName$ = "BASFLO_M.VSS"

But I am getting an error unexpected end of file.

Can you advise on the code changes needed to use my own template and stencil?

Thanks for your help in advance.

Paul Herber

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

john.monroe

I figured this out to a smaller degree.  Basically if you are using a custom stencil there is some additional code needed to make it all work with the existing code.
Here is the example. http://www.visguy.com/2006/09/13/create-visio-flowcharts-programmatically/
if you change the stencil and template to pull from a local souce like c:\temp it fails to open the master process section.
  Set mstProcess = _
      docFlowStencil.Masters.ItemU(MasterProcessName)

When I commented out the code I could run it with some additional parameters.  So basically the example did nto work for me out of the site but after making some changes I got it working.