Solved

How to auto update of fields in word when saving

Posted on 2014-11-26
8
30 Views
Last Modified: 2015-04-20
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
Comment
Question by:mvp1985
8 Comments
 
LVL 23

Expert Comment

by:Eirman
ID: 40466567
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
 

Author Comment

by:mvp1985
ID: 40466575
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
 
LVL 23

Expert Comment

by:Eirman
ID: 40466616
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
 
LVL 14

Expert Comment

by:frankhelk
ID: 40466678
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:mvp1985
ID: 40466965
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
 
LVL 22

Expert Comment

by:Flyster
ID: 40467943
Would this work in Mac?

Sub AutoClose()
    ActiveDocument.Fields.Update
End Sub

Flyster
0
 

Accepted Solution

by:
mvp1985 earned 0 total points
ID: 40724723
I thought way to complicated: I found out that the fields are automatically updated once you hit print.
0
 

Author Closing Comment

by:mvp1985
ID: 40733033
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA for word, remove/delete entire page if it is empty 4 24
stop word moving down 2 50
Microsoft Word Macros and VBA Scripts 3 43
The blinking Office button 4 38
Nice table. Huge mess. Maybe this was something you created way back before you figured out tabs or a document you received from someone else. Either way, using the spacebar to separate the columns resulted in a mess. Trying to convert text to t…
Microsoft Word is a program we have all encountered at some point, but very few of us have dug deep into its full scope of features, let alone customized it to suit our needs. Luckily making the ribbon (aka toolbar, first introduced in Word 2007) wo…
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now