Have certain field-related functions changed?

Hi there

I downloaded Aspose.Words v8.2.0 yesterday to test it with some sample documents. We currently use Aspose.Words v8.1.0. I noticed that our code will no longer compile as some code related to inserting fields into documents has changed, namely the return type of DocumentBuilder.InsertField and DocumentBuilder.InsertHyperlink which now return Field objects, whereas before they returned Node and FieldStart objects respectively. Is this a change that was made intentionally?

Thanks

Eric

Hi Eric,

Thanks for your request. Yes, this was done intentionally. Currently there is field class, which represents whole field in the document and allows updating only one particular field:
https://reference.aspose.com/words/net/aspose.words.fields/field/
So now, you have more control over fields updating process.
Best regards.

Hi Alexey

I see. That will make our life easier when dealing with fields, as before, we would have to query a FieldStart object’s NextSibling object to iterate over the different components of a field.

Thanks

Eric