Insert Custom Fields Codes in Word Document using DocumentBuilder.InsertField

Hi,

I hope this is a simple solution.

I am trying to use documentBuilder.insertField() to insert a custom field code.

In word you can do ctrl F9 and you see {…} where I can add IM1 that gives me a {IM1} field code.

I need to does this but documentBuilder.insertField() is validating the fieldcose so documentBuilder.insertField(“COMMENTS”, “”) is fine but documentBuilder.insertField(“IM1”) causes an exception.

Any ideas please.

Thanks

Jan

Hi Jan,

Thanks for your inquiry. I have logged a new feature request in our issue tracking system as follows.

WORDSNET-8518: Allow insertion of Custom Fields using DocumentBuilder.InsertField method

Our development team will further look into the details of this problem and we will keep you updated on the progress. We apologize for your inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-8518) have been fixed in this Aspose.Words for .NET 18.12 update and this Aspose.Words for Java 18.12 update.