microsoft word, turn off field updating

Copper Contributor

I have a simple vsto addin for word which allows me to select one or more pictures from disk then it inserts them into the current document. It works just fine and I have no problems with it. However, each time it inserts a picture word updates all fields in the document. Once the document has a hundred or so pictures this gets pretty time consuming. I need to turn off the auto updating of fields while these pictures are being inserted, then turn it back on when done. What I have tried is this: Adding this line at program start,

Globals.ThisAddIn.Application.ActiveDocument.Fields.Locked = True

Adding these lines at program end,

Globals.ThisAddIn.Application.ActiveDocument.Fields.Locked = False
Globals.ThisAddIn.Application.ActiveDocument.Fields.Update()

but word still updates ALL the fields in the document with each picture insertion. Is there some other method to accomplish this? Thanks

1 Reply