C-2178 Through a standard flow action,
your application can convert Field Codes in a Microsoft Word document of DOC file format to
the values of corresponding properties on the clipboard, during the
production of correspondence.
This capability requires an ActiveX control and so works with Internet Explorer browsers only, and requires one of: Microsoft Word 2002, 2003, 2007, or 2010.
At runtime, this requires substantial memory on
the workstation.
You can review this capability using two flow actions included in the sample flow PegaSample.WordEmbedMergeTest.
The first flow action PegaSample.EmbedWordTextAreaSet supports inline editing for three properties: pyDescription, pyMyEdits, and pyNewFormula.
The second flow action PegaSample.CreateMergedWordDoc searches these property values — each a Word document — for Field Codes that represent clipboard properties, and merges in the current values. You can also insert HTML code from correspondence rules, images from binary file rules, and other text as Field Codes.
WordMacroManagerdot.dot
template.
Syntax |
Result during clipboard merge |
{pega:reference propertyreference } |
Include the value of a scalar property present on the clipboard page. |
{pega:attachment attachmentName } |
Include the contents of an attachment. ITKIS 3/4/2008 |
{pega:binaryfile binaryFileName } |
Include the value of a binary file rule. Identify all three key parts of the rule using the format AppName.imageFileName.FileType. |
{pega:insert corr="Name" } |
Include the HTML code text from a correspondence rule with Name as the second key part. The final key part of the correspondence rule must be email. |
{pega:binary imagefile=imageFileName } |
Include the image associated with a binary file rule. Identify all three key parts of the rule using the format AppName.imageFileName.FileType. MEOLJ 2/20/08 |
{pega:binary imagefilelocalpath="LocalPath" } |
Include a local image. For example: {pega:binary imagefilelocalpath="C:\donut.jpg" } MEOLJ 2/20/08 |
7. In Word, hide the field codes by clearing the setting to show field codes instead of their values. ITKIS 12/4/06
8. When your document is ready, protect all or parts of the document using Word's Protect Document setting. You can protect the entire document, or only specific sections defined by Word section breaks.
9. Use the Save operation in Word to save the document into the Word Template rule. Then save the Word Template rule form.
10. Configure at least one harness or section rule to include the property as an input field, following the instructions above.
11. Copy and modify the standard flow action PegaSample.CreateMergedWorkDoc into an appropriate RuleSet and Applies To work type in your application.
pyCategory
value the name of the attachment
category you created in Step 1 above, within double-quotes. (The
FileSource parameter contains a Base64-encoded file
name provided by the ActiveX control.) ECKSM 2/18/0611. Save the flow action rule. Update a flow rule to reference the flow action.
12. Test.
This facility requires the prVisioInterface
ActiveX
control and Word macros contained in the template
WordMacroManagerDot.Dot
template file. Both files have
certificates digitally signed by Pegasystems. See How to set up Microsoft Word
for inline property display. Operation of the ActiveX control and
macros is automatic and requires no user interaction.
![]() |
ActiveX control, open authoring |
![]() |
About Word
Template rules
How to provide inline Word property display How to set up Microsoft Word for inline property display |