It's all about the answers!

Ask a question

How do you force an Update of Fields in Microsoft Word from RPE?


David Clark (2341150) | asked Mar 01 '17, 8:36 p.m.

 I have figured out how to create a stylesheet with DOCPROPERTIES over 18 of them. However, the output word document is not updating the fields automatically. I have to select all and then select Update Fields.


There has to be a way to do this programatically through RPE.. How?

4 answers



permanent link
Kenji Sarai (96029) | answered Mar 01 '17, 11:39 p.m.

Hi David,
If field is not updated automatically, try to run the macro as a post command. Run 'rpe' macro in rpe.dot.
https://www.ibm.com/support/knowledgecenter/SS6RHZ_2.1.1/com.ibm.rational.pe.publishing.doc/topics/t_macros.html


permanent link
Subramanya Prasad Pilar (4.6k15) | answered Mar 02 '17, 12:50 a.m.
edited Mar 02 '17, 2:25 a.m.

Some of the Fields (Document Information / DocProperty) are not updated (though "Update Fields" property is set to true). To update docproperties, you can use a simple macro in your stylesheet and set its name to "Macro" property for Word output.
Public Sub updateFields()
    ActiveDocument.Fields.Update
End Sub

Another option is to run the macro as post command as mentioned by Kenji Sarai.


permanent link
Kumaraswamy Gowda (39115) | answered Mar 02 '17, 1:00 a.m.

Hi David,

What version of RPE are you using? If I'm correct RPE 1.2.1.1+ has a way to auto update the fields. Look for "update fields" word format property and set it to true.

If you're  using previous version of RPE, use rpe.dot word stylesheet and set macro to rpe, which would post process the document generation to update the fields,

Regards,
Kumar


Comments
David Clark commented Mar 02 '17, 9:01 a.m.

 Thank you, I am running 2.1 and the update fields is set, but it appears to no be working. I will create the macro and call it. The next problem is figuring our which dsx is being called. I want to run this from the DNG environment.


permanent link
Sunil Shenoy U (362) | answered Mar 02 '17, 1:31 a.m.
JAZZ DEVELOPER

Hi David,
It is possible to Update Fields in Microsoft Word from RPE. ( both Standalone  and Document builder ( web version ) ) . This feature is available in RPE from v1.2.1 itself  ..From v2.0 onwards the  "Update Fields" is set to true by default. Which version of RPE you are using ? Suggestion is to use the latest version of RPE. v2.1.1/2.1.2 M2

- Standalone RPE
Use the “update fields” property of the Word output available in RPE launcher .

-RPE Document Builder
Select “update fields” check box for WORD output in Outputs section available when configuring the Report.
https://www.ibm.com/support/knowledgecenter/en/SS6RHZ_2.1.1/com.ibm.rational.pe.web.doc/topics/t_design.html

Take a look at the below help links
https://rpeactual.com/2013/11/21/new-in-rpe-1-2-1-fields-update-for-word-output/
https://www.ibm.com/support/knowledgecenter/SS6RHZ_2.1.1/com.ibm.rational.pe.reference.doc/topics/r_properties_out_word.html

Regards
Sunil Shenoy U


Comments
David Clark commented Mar 02 '17, 9:02 a.m.

 I am not using the launcher directly. Trying to automate this from DNG.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.