New in RPE 1.2.1 – Fields update for Word output

One of the longest standing wishes for RPE was to be able to generate documents where the Table of Contents and other fields are immediately visible (or  calculated). For a very long time this was not possible and macros were required to finalize the documents by updating their fields. With RPE 1.2.1 is now possible to generate documents that have all their content calculated without needing macros.

This functionality is controlled by the new “update fields” property of the Word output in RPE. For more information see Infocenter: what’s new in RPE 1.2.1 and Microsoft Word output properties reference for document specifications.

By default “update fields” is set to false and to enable it you need to change it to “true” or “progressive”.

  • true : all the fields are updated at the end of the document generation.
  • progressive: RPE will update all fields other then TOC/TOT/TOF as it encounters them. TOC/TOT/TOF are updated as the last step of the document generation. This is the most efficient choice.


Typical scenarios where this property is very useful is:

  • generating documents with the TOCs/TOTs/TOFs updated
  • generating documents  from DOORS with the OLEs included
  • resolving included files

See Table of tables with section numbers for an example of using this capability.

Performance: enabling the field update in RPE will result in a longer document generation but usually “RPE with field update” is faster than the RPE+macro combination. The performance is increased when field update is combined with performance enhancing features in RPE such as data read ahead since RPE is able to update the fields while reading the data for the rest of the report.

Scalability: updating the fields in RPE has a high memory cost so trying to do so for large documents with result in Out of Memory errors.

Exclude fields: there are scenarios where you do not want to update all the fields. For example if you expect further content will be added via post-processing operation then updating the TOC in RPE is useless as the TOC will become outdated. So to avoid RPE doing unnecessary work you can specify TOC in the “exclude fields” property. You can exclude multiple fields if you separate them by commas.


Supported fields: RPE currently supports updating the following fields. If you are using a field that is not in the list below you will need to use a prost processing macro in Word to have it calculated/updated.

  • = (formula field)
  • DATE
  • IF
  • NEXT
  • PAGE
  • REF
  • SEQ
  • SET
  • TIME
  • TOA
  • TOC (including TOT and TOF)
  • TC

Author: Dragos Cojocari

Architect for Rational Publishing Engine

17 thoughts on “New in RPE 1.2.1 – Fields update for Word output”

  1. Is there anyway to get the 2nd digit in a Table or Figure Caption reference to begin at 1 at the beginning of a new section without having to perform an update fields after document is generated? Since DNG report is running on Linux server, unable to have WORD installed and run macros in WORD stylesheet as you had discussed in another post. looking for another option. The first digit (STYLEREF 1 \s) works correctly without updating, but the 2nd digit (SEQ Figure \* ARABIC \s 1) does not without updating after the document is generated and produced in WORD. I want the 2nd digit it to begin at “1” again when a new section starts. Not sure if there is another way in RPE to do this?

    1. With DNG 5.0.1 the “update fields” property for the Word output is set to true which means that most fields should be correctly updated without requiring any additional macro. I have tried to simulate what I understood from your description and both fields were properly updated in the output using either RPE 1.3 standalone or DNG 5.0.1.

      You can see my template and the output produced from DNG 5.0.1 here:

      I’m not sure if this is exactly your scenario so if it’s not please modify the template as needed and send it back.

  2. Is there anyway for us to get to those settings on the server? The only place I have seen this setting is in the doc spec, and since not running locally, how can we ensure this is how it is set?

  3. I’m using Table Caption element for the STYLEREF 1 \s and a field element for the Sequence. The sequence # is continuous, whereas the styleref works. The only other difference I see is I generate a TOT also

  4. Michele, I think finally figured out what your problem was. I have been extremely slow all week, possibly my brain shut down for Christmas early this year. 🙂

    Until now I thought your problem was that the fields are not updated in the document when the actual problem is that fields are updated to a wrong value i.e. the table caption number is not reset after each Heading 1 occurrence. The good news is that this problem is resolved in RPE 1.3 as we upgraded the library we use for Word and PDF output. The bad news is that DNG 5.0.1 is using RRDG where this problem exists. I’m looking to see if its possible to use a different field or implement an (ugly) workaround where you maintain the figure number through JavaScript.

    See here the archive with the sample template I built and the output I get from 1.3 and

  5. I see that it is adding “\n” at the end. was that the only update? I tried it and it still did not work.

    1. Have you used my template or tried to adapt your version? In my template I calculate the number to use in the sequence field and I calculate the field code in a script expressions:

      “SEQ Table \\* ARABIC \\r ” + _tableCaptionNumber*1

  6. Michele, try running my template in your DNG server and see if it produces what you expect. That way at least I know for sure I trully understood your problem.

  7. Any idea when the issues will be resolved and RRDG updated? Having issues with TOC page numbers beginning with 2nd Heading 1 being 1 off and the TOT/TOF being incorrect as well (1+ off). Again, have to perform update fields AFTER document is generated to get the correct page numbers.

  8. Michele, if this is similar/the same issue as the previous one than it is a problem in the library RRDG uses to produce Word/PDF output. We have updated this library in 1.3 and that seems to solve the update&rendering of fields. This improvement will become visible in point products ( such as DNG) as they adopt the 1.3 version of RRDG. However RRDG cannot be updated to new versions of this library because of code dependencies and other factors.

  9. Hi, I am wondering whether there is a known problem with RPE 1.3 populating the Table of Contents with the wrong page numbers. I added “progressive” to the Update Fields property of the Word output in my document specfication, and the TOC gets populated, but the page numbers go higher than the actual number of the pages in the document. (If I later manually do an Update Field, the page numbers are changed to their correct numbers.)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s