IT tutorials
 
Office
 

Microsoft Visio 2010 : Distributing Templates and Stencils (part 1) - Creating a Template with a Document Stencil

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Product Key Free : Microsoft Office 2019 – Serial Number
4/18/2014 9:41:10 PM

Now that you have a super-smart notes shape that has custom ShapeSheet behavior and is linked to a macro, it’s time to share it with your team...or the world! There are several ways to go about this; let’s explore them.

Creating a Template with a Document Stencil

Most Visio templates open several stencils that are separate files. This is great if a template needs access to lots of shapes and stencils. However, for solutions that need only a few master shapes, it makes sense to put these masters in the local document stencil.

Creating a Template with Shapes in the Document Stencil
1.
Open a copy of your notes shape file, to serve as your new template. Note that the Open button in the Open dialog within Visio is actually a drop-down list, from which you can choose “Open as Copy.”

2.
Show the document stencil for the drawing. In the Shapes window, choose More Shapes, Show Document Stencil. A blank stencil should appear with the title Document Stencil. This is the collection of master shapes that belong to the drawing file itself.

3.
Copy the latest, final version of the notes shape, then right-click in the document stencil window and choose Paste. The notes shape magically appears in the stencil as a new master, with the name Master.1. You can also drag and drop to the Document Stencil.

4.
“Master.1” is dull and non-descriptive, so rename the master. Select Master.1 and press F2 to edit the text. Or, right-click the master and choose Rename Master. Change the name to “Notes shape.”

5.
Clean up the drawing file by removing extra pages and deleting shapes from pages. Configure the page size and orientation as desired. Add backgrounds, title blocks, and company logos that make the template more useful.

6.
Clean up the VBA code. The template only requires the code for CreateNewNote, so that the notes shape will function properly. Open the VBA editor and remove all code except for the CreateNewNote subroutine. Be sure to look in the Project Explorer for modules you might have created by the macro recorder. For example, right-click the NewMacros item under Modules and choose “Remove NewMacros.” Click No to not export before deleting.

7.
Save the file as a template. Go to File, Save As. In the dialog, enter the filename Notes Shape Template 1, and in the Save as Type box, choose Template (*.vst).

To distribute this template to your team, you have only one template file to send around instead of a template plus a stencil.

When users double-click on Notes Shape Template 1.vst in Windows Explorer, Visio opens an unsaved copy of the drawing, and the Notes shape master is visible in the document stencil.

Dealing with Macro Security Warnings

Because the template contains VBA code, you see a warning alerting you to the presence of macros and asking you to enable or disable them. You can change the level of macro security by visiting File, Options, Trust Center, Trust Center Settings, Macro Settings. Users that have the highest setting will not see any warning about your macros, and the CreateNewNote code won’t run at all.

Rather than loosen your macro security settings, you can also specify certain directories on your system that contain trusted code. To add a trusted location, visit File, Options, Trust Center, Trust Center Settings, Trusted Locations, and then add the path. Files with VBA macros stored in a trusted location do not present a macro security alert, and will run just fine. Perhaps members of your team could create a trusted folder called “My Team” and place macro-enabled templates and stencils from fellow employees in this folder.

Displaying Templates in Choose a Template

Usually, you start new drawings by visiting the template gallery at File, New, Choose a Template. It’s nice to have your custom templates can show up in this screen as well. You can inform Visio of special folders that contain your content, so that your custom templates appear in the Backstage area.

Go to File, Options, Advanced. Scroll down to the bottom of the options and click the File Locations button. In the dialog that appears, enter the path where you would like to store your custom templates, as shown in Figure 1.

Figure 1. Specifying custom template paths.

You can have multiple locations for custom templates. Just separate multiple paths with semicolons. After you click OK, you need to restart Visio for the changes to take effect, but thereafter your custom template will appear in the new gallery, as Figure 2 shows.

Figure 2. A custom template appears in the template gallery. Note the absence of a preview. Show Me 11.5 discusses how to add previews.
 
Others
 
- Microsoft Visio 2010 : Introducing Automation and VBA Code (part 3) - Calling VBA Code from a SmartShape
- Microsoft Visio 2010 : Introducing Automation and VBA Code (part 2) - Using the Macro Recorder to Generate Code
- Microsoft Visio 2010 : Introducing Automation and VBA Code (part 1) - Exploring the VBA Development
- Microsoft Access 2010 : Introduction to Relational Database Design (part 2) - Normalization and Normal Forms
- Microsoft Access 2010 : Introduction to Relational Database Design (part 1) - Rules of Relational Database Design
- Developing Custom Microsoft Visio 2010 Solutions : Creating SmartShapes with the ShapeSheet (part 6) - Adding Right-Click Actions to the SmartShape
- Developing Custom Microsoft Visio 2010 Solutions : Creating SmartShapes with the ShapeSheet (part 5) - Modifying the Text Block Using the ShapeSheet
- Developing Custom Microsoft Visio 2010 Solutions : Creating SmartShapes with the ShapeSheet (part 4) - Linking Subshape Text to Shape Data Fields
- Developing Custom Microsoft Visio 2010 Solutions : Creating SmartShapes with the ShapeSheet (part 3) - Controlling Grouped Shapes with the ShapeSheet
- Developing Custom Microsoft Visio 2010 Solutions : Creating SmartShapes with the ShapeSheet (part 2) - Creating Smart Geometry in the ShapeSheet
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us