Authoring Templates using the Word Add-in

Overview

Template Authors have access to the same functions as Document Authors, and they benefit from additional tools that enable them to create and maintain document templates effectively.

To enable the Template Author functionality, the user will require the following ShareDo permission:

As a template author, you should familiarise yourself with the process that ShareDo undertakes to assemble dynamic content into your documents – see the article Authoring documents using the Word add-in‍.

Authoring documents using the Word Add-in

To begin authoring a new template you should start by associating the Word document with the ShareDo template – see Linking Templates

Once your Word template is linked to a ShareDo template the following tools will be made available to you as a Template Author.

Data Tags

Within the add-in you can browse data tags that will be replaced by dynamic content from ShareDo as part of the assembly process.

See DATA TAGS

Sections

Sections group together content (typically a mixture of data tags and text) within your document and allow you to specify display rules to determine whether the content will be displayed.

See SECTIONS

Content Blocks

Within the add-in you can select from a central library of reusable blocks, typically comprising a mixture of data tags and text. Examples of these include standard Contract terms, or the component parts of a letter template that are used to generate a letter – such as a corporate logo in the header or branch office address within the footer. Content Blocks are held in a central library and can be made available to other Template and/or Document Authors.

See RE-USABLE CONTENT

Display Rules

Display rules are used to specify whether a particular piece of dynamic content is displayed (or hidden) as part of the assembly process. You will typically create a library of Display rules that will be used within Word. These rules can be applied to Tags, Sections and Content Blocks to allow the document to be built up dynamically, during the document assembly process.

See DISPLAY RULES

Linking Templates

To make the Template Author functionality available, you must first link your Word Document to a ShareDo template.

To link your Word document, either click on the following home page link.

Or click on the Templates menu option


You will then be presented with a searchable list of document templates


Locate the correct template and click the ”link” icon to associate the two together.

Once linked

  1. You can “unlink” the template via the same “Templates” menu option
  2. You can use the “Open in ShareDo” button to present the document template in ShareDo.
  3. Finally, note that the add-in menu will now contain an expanded set of options for Template Authors, to manage the functionality now available for this template.

Data Tags

Adding a tag to a document will allow you to replace the tag in the document with data from the ShareDo system. This section takes you through step by step how to add in a document tag using a worked example.

Clicking on the Tag Browser menu option


Will present you with a browsable list of tags that are available for this document template.


The tags are presented as a clickable tree; you can explore the tree by clicking on the >

As the tree expands, it will reveal tags that can be added to your documents via a “+” button


Clicking on this button will allow you to optionally specify a display rule that will be applied to this content as part of the assembly process (See below for further details on Display Rules)


The Tag will then be added to your document as a Word “content control”.

Within the Add-in, use the breadcrumb trail at the top of the Tag Browser to navigate up and down the various levels, or click on the Home icon to revert back to the top level of tags:


Working With Lists

Whilst the process above stands for simple tags, it is slightly different for lists. If you choose to add one of these you will first be presented with a dialog that allows you to specify the type of control you want to add based on your formatting requirements.


In this example, we will return a list of all Participants assigned to a matter in a given Role.

Navigate to the Participant Roles level and select the Role from the list available.


Click on the + symbol to present the dialog box above, then select a Display Rule (if any) that may apply.

  1. Content Control
    This inserts a single Content Control into the document:

    This is a Repeating control that builds up a list. In this example, an entry will be returned for each Tenant on the matter where the document is generated.
    But, what information about the Tenant should be returned?
    Click inside the Content Control. Note that the Tag Browser on the right changes to only show those Tags relevant to the list item selected. In this example, we can use the ODS Tags to return the Tenants name:
  1. Table
    This inserts a table into the document.

    Click inside a cell. Note that the Tag Browser on the right changes to only show those Tags relevant to the list item selected. Use the Tag Browser to insert Tags into the table cells.
    When the document is generated, one row will be returned for each list item. In our example, we could return a list of all the Tenants names, together perhaps with their date of birth.
    Note that the table is a standard Word function and can be formatted or amended, with extra columns added (or removed), as required.

Formatting Data Tags

Formatting can be applied to data presented in the document when inserting date or decimal data tags.

In the Tag browser, navigate to the tag required.

Clicking on + icon on the Value tag will insert the Tag into the document without any formatting.

However, clicking on the > icon will open a formatting blade:

Decimal:

Date:


Click on the ? icon to reveal the formatting available.

Click Resolve to apply the required formatting.

In this example, the Decimal value is being returned prefixed by a £ symbol. E.g. £100.00


Working With Signature Images

Due to limitations with Word add-in support, the process for embedded images is slightly more complex.

  1. Place the cursor where you want the signature to appear.
  2. Select the ‘Developer’ tab in Word (if not enabled, navigate to File -> Options -> Customize Ribbons. Tick on the Developer checkbox to enable the tab).
  3. Choose the ‘image’ button.
  4. Browse to the relevant image tag in the tag browser.
    For example, to display the Signature of the Matter Owner, navigate to Participant Roles -> Matter Owner -> ODS -> User -> Signature Image
  5. Press the copy icon on the “Content - Byte Array” tag
  6. Highlight the new image control added a moment earlier and select Properties from the Developer tab
  7. And paste this into the tag property of your image control

Another way of using Tags for a signature image

  1. In the Word template, place the cursor where you want the signature to appear.
  2. Select the Developer tab in Word.
  3. Choose the image button (hinted as a Picture Content Control).
  4. The Picture Content Control is created. With the control still highlighted, select Properties from the Developer tab.
  5. Type the appropriate Signature Tag name into the Tag field.

    For example, document.activity.roles.creator.ods.user.signatureImage.content to return the signature of the document author.
  6. Save the document.
  7. When the document is generated, the Picture Content Control will show the user’s signature image.

The signature image needs to be set up per user. Navigate to the user’s Profile and select Personal Details -> Signature and upload the image.

 

Display Rules

The Word add-in allows a user to specify display rules around when content or fields should be displayed in the document.

To create a Display Rule open the Display Rules page from the main menu and click Create


This will display the following form

  1. Enter a logical name in the Name field – try and be as descriptive as possible
  2. In the expression box enter in the rule you want to create
  3. Some hints and tips on creating rules
    1. Any string you are comparing to needs to be enclosed in ‘ ‘
    2. The editor will parse your rule as you type and, at the foot of the form, will warn you of any syntax errors:
    3. The following operators can be used
      1. + will add numerical values or concatenate strings
      2. = equals
      3. <> not equals
      4. > greater than
      5. >= greater than or equals
      6. < less than, <= less than or equals
      7. And, Or

TOP TIP: You can copy tags from the tag browser for use in expression. The Copy button appears as you hover over a Tag:

Adding A Display Rule To A Tag, Section Or Content Block

Now you have created your display rule, you are able to add this to a Tag, Section or Content Block to ensure that it is only included in the document if the display rule is satisfied.

This is particularly useful if you want to, say, only show a particular clause in a letter based on a particular condition.

Sections

Within the word template we can stipulate sections of wording which will display in certain scenarios. For example, we can detail a section of text which is relevant for matters in jurisdiction of Scotland, but display a different section when the jurisdiction is not Scotland.

To create a new Section:

  1. Select some text in your document
  2. Navigate to the Sections area in the add-in and click Create
  3. Optionally specify a Display Rule
  4. The content you selected will now be contained within a content control
  5. And upon assembly will have its Display Rule determined

Re-Usable Content

Within the Word add-in you can search for any existing Content Blocks, preview them and then add them to your document.

Content Blocks are authored in one of two ways:

  1. As detailed above (as a Document or Template Author) by simply copying a block of text from a Word document and then using the options within the add-in to create the Content Block.
  2. Centrally, via the HTML Content Block editor within the main Administration module of ShareDo. Content Blocks created in this way can also contain dynamic content such as data Tags, Sections, tables and even display rules controlling which content to hide or display. This functionality is only available to Template Administrators. See separate guide “HTML Content Blocks – Help Guide” for further details.

In either event, once created, Content Blocks are held centrally within the ShareDo application and not locally to any specific Word document. This makes Content Blocks ideal for capturing and presenting information which updates on a regular basis or which needs to be managed centrally by a user with administration rights – such as Contract Terms or office address details.

Additional Functionality

  1. Inserting Content Blocks as Tags
    When inserting a Content Block into a document, Template Authors can select whether to insert it as a “bloc” of text (as Document Authors do), or as a Tag.

    Bloc: This method allows the Author to understand what the Content Blocks contain and how the generated document will look. However, any dynamic content – such as Tags - within the Content Block will not be converted to data and will be presented as text. Accordingly, this method is best used for those Content Blocks that comprise text and images, such as those created by the Document Authors.
    Tag: This method allows all the document generation functionality to be utilised, including the replacement of tags with data, so is best reserved for the HTML Content Blocks created by the Template Authors.
    Further, a Display Rule can be applied when inserting a Content Block as a Tag:

    Once applied, the Display Rule can be amended or removed from the Content Block via the Document Browser. Simply select the Content Block from the tree and the following options appear:
  1. Content Block Details
    A Details panel is presented when the user selects a Content Block in the add-in. This panel lets the Author amend the properties of the Content Block.
    Click Save to save any changes.
  2. Display Settings
    As explained above, when a Content Block is created by a Document or Template author, it is automatically added to the Content Blocks section of the Document Admin function of ShareDo:

    The properties and content of the block can be amended here.
    Moreover, the Display settings applied when the Content Block was created can be amended via the Display nav bar options.
    E.g.

    Presents as

Settings

The Settings panel contains a number of features primarily aimed at expert users and/or administrators.

Environment

The current environment in which the add-in is working is presented, with an option to disconnect if required (for example to move back and forth between Test and Production environments)

Diagnostics

Enabling diagnostic activates the logging function records all activity undertaken within the add-in.

This log file can be seen by clicking on the green “Open the log” link.

Use the lookup list at the top left to filter the logs by type ….

…. and use the Date filter at the top to select the date range of entries you wish to review:

Where further details are captured, the word appears. Click on it view these:

Use the two icons at the top right to Delete or Refresh the log file.

Expert Mode

Enabling “Expert Mode” via the Settings panel ….

… activates the “Advanced” blade, containing the following options:

Advanced

Advanced Tags

This replicates the functions available in the legacy “ShareDoAutodoc” and allows the user to insert “free style” Tags into the document.

For e.g. to insert legacy data Tags that are not yet available via the Tag Browser.

Or to insert Document (rather than HTML) Content Block Tags.

Select the type of Tag required.

Enter a System Name and select (or create) a Display Rule if required.

Click Add.

Note that Content Blocks inserted in this manner will appear in the Document Browser, but, as they are not HTML Content Blocks, they will not be listed and available for use in the Contents Block blade.

Repair Document

Where the meta data of a document has become corrupted and its contents cannot be read by the add-in, this function may help to “repair” the document. The add-in will attempt to clean the meta data, including removing all the Tags from the document, then re-inserting them. This may help repair the document.