All
  MS-Word 2010
  POI-3.9

  I'm trying to pass in a version string to a field code in some boilerplate 
docx file that I read in at startup.  For example:

XWPFDocument document = new XWPFDocument(new 
FileInputStream("c:\template.docx");
CoreProperties coreprops = document.getProperties().getCoreProperties();
coreprops.setKeywords("Version 1.0");


And in my "template.docx" document, I've got a field code that looks like the 
following:

{INFO Keywords xxx \* MERGEFORMAT}    // <-- this is how it looks with the 
field code toggled ON in the word document.

The 3rd line of code above (coreprops.setKeywords()) does not fail and if I 
re-read the coreprops variable I see that it gets updated.  But the value is 
NOT showing up in my document.

Any idea / strategy on how I can pass parameters to a document and have them 
get dropped into field codes in my document at processing time?

Thanks

Bart

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to