[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 43
  • Last Modified:

How to auto update of fields in word when saving

I have a word document that has many cross links to other text within the document (so it displays the same content). Is there a way to automatically update all of these links on saving the document (or any other way without having to click buttons or keyword combinations?
0
mvp1985
Asked:
mvp1985
1 Solution
 
EirmanChief Operations ManagerCommented:
I think this is what you are looking for ....

The methodology of implementing  auto updating links in word is describe halfway down this page
http://www.officetooltips.com/word/tips/creating__updating__locking_and_unlocking_links.html
0
 
mvp1985Author Commented:
Forgot to mention that I am on a Macbook, and on there, so I don't have the "linked Document Object" option when I right click.
0
 
EirmanChief Operations ManagerCommented:
Hi mvp1985,
I don't have, or have even used a mac, so I have no more suggestions.

This is a great Word resource, but I think it aimed a PC users
http://word.tips.net/C0024_Fields.html
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
frankhelkCommented:
Presuming that Word on Macs can run macros, too, I would recommend this:

Open the macro editor (on PC with ALT-F11), find in your Document under "Microsoft Word Objects" the module "This Document", open it and insert this code:
Private Sub Document_Close()
    Dim result As VbMsgBoxResult
    result = MsgBox("Update all Fields ?", vbYesNo, "Update fields ?")
    If result = vbYes Then
        Selection.WholeStory
        Selection.Fields.Update
    End If
End Sub

Open in new window

Save the document.

Whenever you close that document afterwards, it will ask you about updating the fields and update all fileds if you choose [Yes].

Enhance as needed, and have fun.

P.S.:
You'll have to save the document in the .docm format, and depending on your security settings it will ask for permitting macro execution on loading the document.

For updating the fields on opening the document, replace Document_Close() with Document_Open()
0
 
mvp1985Author Commented:
Of course Word on Mac runs macros. However, it does not seem to have message boxes, therefore the macro doesn't work. How would it be without message box?
0
 
FlysterCommented:
Would this work in Mac?

Sub AutoClose()
    ActiveDocument.Fields.Update
End Sub

Flyster
0
 
mvp1985Author Commented:
I thought way to complicated: I found out that the fields are automatically updated once you hit print.
0
 
mvp1985Author Commented:
The question became irrelevant after I found out that I thought too complicated. Word for Mac updates the fields automatically when I print, so there is no need for updates before that.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now