Free Support Forum - aspose.com

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,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/aspose.words.fields.field.html

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