none
Improve the performance of Fields Update call RRS feed

  • Question

  • Hi,

    We have a document which has many fields in it. We do a interop call to update fields in the document but looks like it is taking lot of time to finish the below fields update call. Is there a  way to speed up the performance of the below interop call?

    wordDoc.Fields.Update()

    Thanks!!






    • Edited by M_RT Thursday, January 3, 2019 6:53 AM
    Thursday, January 3, 2019 6:51 AM

All replies

  • If your document has, for example:
    • a Table of Contents created via References|Table of Contents;
    • a bibliography created via References|Bibliography,
    they will be far slower at updating than had you inserted the same fields via Insert|Quick Parts|Field. Replacing captions with fields containing the same field code will likewise update more rapidly. The performance difference is due to the overheads associated with the controls into which Word inserts such content.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Thursday, January 3, 2019 12:30 PM
  • Thanks Paul!

    How can we programmatically increase the performance of the below type of fields update

    • a Table of Contents created via References|Table of Contents;

    Thanks


    • Edited by M_RT Monday, January 7, 2019 7:05 AM
    Monday, January 7, 2019 7:05 AM
  • I'd have thought that was perfectly obvious from my previous reply - delete the content inserted via References|Table of Contents, then insert a TOC field via Insert|Quick Parts|Field

    Cheers
    Paul Edstein
    [MS MVP - Word]

    Monday, January 7, 2019 10:22 AM