Hello aspose team!
I have a template document and I want to update and/or remove some of the contained fields.
I know the method Document.UpdateFields().
Unfortunately I am not allowed to update all of the fields. What I really would appreciate would be a method with the following signature: void UpdateFields(Func<string, FieldType, bool> selector)(where string would be the field code).
The call would then look like:
Document.UpdateFields((field, fieldType) => field.GetFieldCode().Contains("MyPrefix_"))
(same applies to removal of fields)
Also, I was not able to find a possibility to retrieve field instances (the only one I found is creating a new field with the DocumentBuilder). But as my fields already exist, it is of no use for me.
Do I have to select all FieldStarts and parse and update the fields on my own? Aspose.Words does already do this job with UpdateFields(). Is there a possibility to parameterize is function (in the near future)?
Regards