2

I have successfully used IKVM.NET to create a .NET DLL for Apache POI, then used it successfully to update properties of a Microsoft Word 2003 document - the author and company and some custom fields.

The document references some of these fields in its content.

For example

Ref: Your account number [account number held in a custom field]

When you open the document you have to right-click on the field and "Update field" for it to show the new information written to it by POI.

For some documents this is not a big deal but there are going to be some with 20+ custom fields which all will need updating. By hand is not a very preferable option.

Any way in POI to update the fields so they're correct when the document opens? Or do I need to resort to a macro of some sort that fires when the document opens?

Thanks

bgs264
  • 4,572
  • 6
  • 38
  • 72
  • Did you ever found a way how to accomplish this with POI ? – toong Feb 28 '12 at 20:52
  • 1
    @toong no I didn't, I actually ended up using the Microsoft OpenXML libraries to create a .docx file using text replacement within the paragraphs and not the custom fields. – bgs264 Feb 29 '12 at 10:40

0 Answers0