This article will explore the Document Properties feature of the Dynamics module called Page Setup which can be accessed through the Template Designer. This feature is exclusive to Word and can be accessed by admin/superadmin users only.
For more information regarding working with the Template Designer, please visit this article.
Prerequisites for using the feature
- VSTO Add-in Version 5.5.0.867 or greater
- Dynamics Version 1.1
- A data source containing the preferred settings if the setup will be dynamically configured
Feature overview
The functionality of this feature is generally what its name suggests - a configuration of various options related to the position, size, and orientation of various elements of a Word page. A native feature of Microsoft Word for page configuration already exists in the Layout Section of the Ribbon. Page Setup is, in essence, an extension of the native feature, since Templafy modifies the elements of it.
The possible elements that can be configured include page margins, gutter, width and height, orientation, and header and footer. These will be further explored to provide a better understanding of the feature possibilities and what changing each setting means. Skip the next part of this section if you have sufficient knowledge in the Microsoft Word terminology.
Margins
- The area between the main content of a page and the page edges. It helps to define where a line of text begins and ends. Margins are present in the left, right, top, and bottom area of a page.
Gutter
- An additional margin added to the page layout to compensate for the part of the paper made unusable by the binding process. The gutter can be placed on the left or on the top side of a page.
Orientation
- The way in which a rectangular page is oriented for normal viewing. The two most common types of orientation are portrait and landscape.
Header and Footer
- The top and bottom sections of the document respectively. They are separate sections from the main document, and are often used to hold footnotes, page numbers, titles, etc. .
Paper Width and Height
- Used to configure the actual size of a paper. The two most common types of configuration are A4 and Letter.
An example of the native configuration options and their matching parts in the Page Setup feature
Default configuration (Static binding)
The syntax of Templafy's Dynamics allows an admin to set default values by directly typing them in a designated box. This particular method will change the default value with the inserted one upon the creation of the document with the Templafy application.
Note: A user can simply select the relevant fields for the particular use case and insert values into them, the fields that are left unfilled will remain with their original values.
Steps to complete:
- Open the Template Designer
- Choose the 'Document' Tab
- Select the Page Setup option from the list and click the '+' button
- Insert values in the fields
An important note here is that the value that is being inserted should be as exactly as a user would normally define it using the native Word feature and since we have different types of values here, some extra attention is necessary when manually inserting values.
Example: Orientation's value is 'Portrait', while Paper Width's value is '30 cm'
Dynamic configuration
Page Setup values can also be inserted in a data source which itself can be linked to the UserProfile or a separate form attached to a document, allowing the user to change the values depending on their choice. The document itself is configured using dynamic bindings that link to the respective field in the UserProfile or the attached form.
Steps to complete:
- Create a data source that has all the relevant fields depending on the use case and populate it with the desired values
- Create a DropDown field in the UserProfile and link it to the data source, or create a separate form and a field in it that refers to the data source
- Configure the bindings in the Page Setup tab in the Template Designer
Example: A data source populated with the necessary values for page setup configuration
Dynamic configuration based on the UserProfile
In order to dynamically configure the Page Setup based on the UserProfile, simply create a new DropDown field in the UserProfile and link it to the data source containing the different configurations. In addition, filtering and visibility options can be applied to automate the configuration selection.
Example: Using the data source from the previous example, a new DropDown field in the UserProfile is created and then appears in the application.
The last step of this setup is the configuration of the bindings in the selected document. The process follows the same steps as described in the Default Configuration section, with the only exception being the syntax for the different values.
Dynamic bindings follow the following syntax - {{Form.FieldName.Column}}
Example: Page Setup configuration populated with dynamic bindings that relate to the data source described in the above example.
Dynamic configuration based on a form
Another option is to create a form containing the dynamic configuration and attach it to a particular document. This allows for some flexibility in terms of configuration choice.
Following the same setup from Dynamic configuration based on the UserProfile, the only exception here is that the data source is not attached to the UserProfile, but to a separate form, that itself is attached to a particular document.
Example: The menu inside a particular document where a form can be attached to it
The end user perspective of the document creation menu will look like the following:
Comments
0 comments
Article is closed for comments.