
'= '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 In the Insert Table dialog box, enter the number of columns and rows you want in. If rngStory.StoryType wdMainTextStory Then Click Insert > Tables > Insert Table from the dropdown menu.
#Adding form fields in word 2013 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 VbOKOnly + vbInformation, "Update All Fields – Protected Document" 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.
