'= 'Update any TOC, TOF, TOAįor Each oTOA In oDoc. While Not (rngStory.NextStoryRange Is Nothing) multiple sections with unlinked headers/footers or linked text boxes 'In case of a drawing canvas 'May contain other shapes that may contain fields
'Update fields in shapes and drawing canvases with shapes
If rngStory.StoryType wdMainTextStory Then
#Turn off text form field word update#
'Iterate through all stories and update fieldsįor Each rngStory In ActiveDocument.StoryRanges 'Prevent alert when updating footnotes/endnotes/comments story 'Turn off screen updating for better performance VbYesNo + vbQuestion, "Turn Off Track Changes?") Then Do you want to turn OFF track changes while updating fields?", _ If vbYes = MsgBox("Track changes is currently ON. 'Show msg if track changes is on 'Let user turn it off to prevent all updated fields marked as revisions If your chosen word appears in the suggestions, you can simply tap on it to use. These predictions are usually based on how the other words in the sentence are used and the first letter that you’ve typed. VbOKOnly + vbInformation, "Update All Fields – Protected Document" Predictive text is an input technology that suggests words that the user might want to use or insert in a text field. In order to update all fields, you must first unprotect the document.", _
'Stop if document protection prevents full update of fields MsgBox "No documents are open.", vbOKOnly, "Update All Fields" '= 'The macro updates all fields in the activedocument no matter where the fields are found 'Includes fields in headers, footers, footnotes, endnotes, shapes, etc. 'YOU ARE NOT ALLOWED TO PUBLISH THE MACRO AS YOUR OWN, IN WHOLE OR IN PART. YOU ARE WELCOME TO USE THE MACRO BUT YOU MUST KEEP THE LINE ABOVE. '= 'Macro created 2019 by Lene Fredborg, DocTools - 'Revised August 2020 by Lene Fredborg 'THIS MACRO IS COPYRIGHT.