Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Greg Price
34
Views
1
Comments
[Office Template] Creating custom fields in a Word document
Question
Forge
Office Template (O11)
Forge asset by
Arquiconsult
Hi All
I am having some issues on creating the fields that I would like to change in my word document. When I run my 'print' functionality and use the OfficeTemplate Word_FillMergeFields action I am not seeing anything on the output word document, i.e. my document is blank, except for my table layouts.
I am creating the fields in Word by going to Properties -> Custom and entering new properties, i.e.
Name: RequestNumber
Type: Text
Value: APR
In the attached document from the ProjectStatus.Template.docx (from the supplied Template_Example.oml) the fields have a leading '<<' and trailing '>>' around the field, or part of it. So, is there a specific format for creating custom fields in the Word document? Or, is there something that we need to set again the document?
Thanks for your help.
ProjectStatus.Template.docx
Greg Price
Greg Price
wrote:
Hi All
I am having some issues on creating the fields that I would like to change in my word document. When I run my 'print' functionality and use the OfficeTemplate Word_FillMergeFields action I am not seeing anything on the output word document, i.e. my document is blank, except for my table layouts.
I am creating the fields in Word by going to Properties -> Custom and entering new properties, i.e.
Name: RequestNumber
Type: Text
Value: APR
In the attached document from the ProjectStatus.Template.docx (from the supplied Template_Example.oml) the fields have a leading '<<' and trailing '>>' around the field, or part of it. So, is there a specific format for creating custom fields in the Word document? Or, is there something that we need to set again the document?
Thanks for your help.
Ok, so after much trial and error, the solution is: when creating custom properties in Word, do the following:
1. Go to where your would like to place your field and hold down CTRL + F9 to insert a field - this will create the opening and closing brackets, '{}'.
2. Type the following: 'MERGEFIELD X \* MERGEFORMAT' Inside the brackets. For example, I have a custom property called RequestNumber, so I will type: MERGEFIELD RequestNumber \* MERGEFORMAT.
3. The final result should then be: {MERGEFIELD RequestNumber \* MERGEFORMAT}, which will output in the Word document as: <<RequestNumber>>
You do NOT need to create custom properties in the Word document.
I hope that this helps.
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...