Author Topic: Use my own template and Stencil  (Read 4053 times)

0 Members and 1 Guest are viewing this topic.

john.monroe

  • Newbie
  • *
  • Posts: 6
Use my own template and Stencil
« on: April 30, 2013, 03:09:03 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3301
    • Paul Herber's website
Re: Use my own template and Stencil
« Reply #1 on: April 30, 2013, 05:57:33 PM »
Which code are you modifying?
Electronic and Electrical engineering, business and software stencils and applications for Visio -

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

john.monroe

  • Newbie
  • *
  • Posts: 6
Re: Use my own template and Stencil
« Reply #2 on: May 02, 2013, 12:14:10 PM »
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.