Updating all fields does not work
I get the following AppleScript from a link in Googlegroup chat.
tell application “Microsoft Word”
-
- Get a reference to the main header in the current document
set refHeader to get header of section 1 of active document index header footer primary
- Get a reference to the main header in the current document
-
- Update every field in the header
update field (every field of text object of refHeader)
- Update every field in the header
-
- Update every field in the document
update field every field of active document
end tell
- Update every field in the document
The link of the script is: https://groups.google.com/g/microsoft.public.mac.office.word/c/yLDfQWdnfEg/m/apniyZh4j5QJ
My problem is that this script work well for sometimes but now it does not work. So, what have i done wrong to the script ?
Any assistant please.