Why putting a field (i.e., {pega:reference.name}) in the header of a word document does not work?
We are using word template to generate a word document using some fields from the word object in both header and footer and also the body.
Where the body renders the fields properly. The header and footer still shows the field codes and not the field values.
Has anyone encountered this issue/situation before. Or does anyone has a solution or recommendation for this. Please advise.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Hi,
As far as I am aware, the use of PRPC Field Codes within Word header / footer areas is not currently a supported feature of PRPC. The code that interprets the PRPC specific Field Codes and inserts the corresponding property or Corr instance does not operate in the header / footer areas. I would suggest the following options that could be investigated further by you if the requirement for header / footer use is absolute and cannot be mitigated.
Option 1: Very Basic
Sizing the page of the Word document with no/minimal header and footer and placing the required text in the absolution position at the end of the page. This assumes / requires little dynamic text inclusion in the template and is probably not a viable and manageable solution.
Option 2: More Involved
Take a look at the Support Article ""Word merge: Fields in headers and footers not merged"" at https://collaborate.pega.com/discussion/commit-cannot-be-performed-because-deferred-save-instance for an approach to use features in Word to add header / footer entries.