PC

I would like to replace word tags "{DOCPROPERTY XXXX \* MERGEFORMAT}" with information from arris during the creation of a report.

example:

var docTemplateData = Context.getFile ("Word Template.docm", Constants.LOCATION_SCRIPT);

var oOutput = Context.getOutputObject (getString ("REPORT_TITLE") + extension, docTemplateData);

oOutput.SetTitle (getString ("REPORT_TITLE"));

and here, replace my value XXXX with a value of an object.

For example :

{DOCPROPERTY Author \ * MERGEFORMAT}

{DOCPROPERTY Subject \ * MERGEFORMAT}

{DOCPROPERTY Title \ * MERGEFORMAT}

Do you have an idea ??

by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Wed, 09/27/2017 - 09:02

Yes, this is possible:

    Context.setProperty("use-new-output", true);

        oTemplateData = Context.getFile("Test.docx", Constants.LOCATION_SCRIPT);

        g_oOutFile = Context.getOutputObject("Output file name", oTemplateData);

...

    if (g_oOutFile.SetPositionToField("MergeFieldName", true)){

          ...

    }

MergeFieldName is the name of the Word Mergefield...

BR Robert

0
by Pascal COURT Author
Posted on Wed, 09/27/2017 - 13:04

thank you for your reply

But I have unfortunately not expressed my need, I would like to modify the properties of the document that can be found under a type tag {DOCPROPERTY XXXX \ * MERGEFORMAT}, and not add new fields in my templates.

For example :

{DOCPROPERTY Author \ * MERGEFORMAT}

{DOCPROPERTY Subject \ * MERGEFORMAT}

{DOCPROPERTY Title \ * MERGEFORMAT}

0
by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Wed, 09/27/2017 - 14:06

Ahm ok sorry, don't know about that...

BR Robert

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock