The Windward Studio

Windward Blog Home

Apply Master Document Styles to Imported Sub-Documents (New Version 13 Feature!)

by
Posted on 07/30/2014

Please Share This

 

Do you integrate documents from clients or other departments that contain different styles?
Are you looking to maintain a consistent style in your master output document?
Do you find yourself wasting time trying to achieve that consistent style?

Windward can make your life easier.

Problem

Clients and departments build documents with non-standard styles and send them to you for integration. But you can’t just import the documents as is because you need consistent styles in the output documents. So you spend a lot of time using Microsoft Word’s format painter to clean up styles after you copy and paste. You ask yourself:

“Can I use Windward to import documents dynamically and achieve a consistent look and feel with headers, footers and styles?”

Solution

Version 13 now lets you simultaneously apply master document styles to all of the master’s imported subdocuments and subtemplates.

Windward clients doing packet generation have been requesting this feature. They combine IF tags with Import Tag statements to conditionally produce a final document based on the conditions the template is run against. Often times these subdocuments and subtemplates were imported in their original format and it became very clear that there were generated from different sources.

Windward now allows you to apply the master template’s defined styles to any defined style that exists in the subdocuments or subtemplates.

You will see what I mean in this short example below.

Example

We’re going to import a subdocument into a master document.

Master Template

The master template’s look and feel is:

ImportMasterTemplateWord

  • Normal style text that is Calibri font and black in color.
  • green header background
  • orange footer background

 

 

 

 

 

 

 

 

 

Subtemplate

The subtemplate’s look and feel is:

ImportSubdocTemplateWord

  • Normal style text that is Comic Sans font (a personal favorite of our Larry Goldman, Windward’s Director of Marketing) and red in color.
  • yellow header background
  • black footer background
    (the footer appears as gray because headers and footers are muted when viewed onscreen in Word, but it is really black)

 

 

 

 

 

 

 

Getting a Consistent Look and Feel in the Output

First, you must set the value of the use_parent_formatting attribute of the Import Tag to true. This allows Windward to apply the master template’s defined styles to any defined style that exists in the subdocuments or subtemplates.

Then, although you have enabled the use_parent_formatting attribute in your template, it will not be processed on the output until you set import.use.child.styles to false in your configuration files.

These samples ship with AutoTag, so you can try this yourself with this example. You can find details and a step-by-step walk-through at our Windward wiki: Applying Master Styles to Imported Sub-Documents

Output

When the master template is run and the imports are executed, a final output document is generated with the subtemplate rendered and imported:
ImportedDocOutput

  • The styles that have the same name, i.e., Normal, have the attributes of the master style: black text and Calibri font.
  • The headers and footers of the subdocuments are also no longer present and have assumed the headers and footers of the master template.

 

 

 

 

 

At long last Larry can rest easy because is no trace of Comic Sans in the final output document. I do what I can for Larry!

To maintain consistency in you output and stop the madness of the copy/paste restyling, upgrade to Windward Version 13 now to take advantage of this great feature.

Please Share This



Author: Ryan Fligg

Ryan, Windward's Sales Engineer, has been with Windward since 2006 in many roles as a sales engineer, IT specialist and account executive. Ryan's background fuels his desire to guide Windward's product development. He now works on the future vision of Windward offerings through creating the product roadmap, responding to customer requests, and communicating what Windward is doing and where it’s headed.

Other posts by