View Single Post
 
Old 07-24-2014, 04:53 AM
Charles Kenyon Charles Kenyon is offline Windows 7 64bit Office 2010 32bit
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,533
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

This is done through the cross-reference feature (or References > Cross-Reference).

Do your numbering following the instructions at How to create numbered headings or outline numbering in Ribbon Versions of Word by Shauna Kelly.

Will the cross-references update automatically?
Yes, and no.

These are fields. They will update when fields update. They generally update upon printing. You can force an update on a field by selecting it and pressing the F9 function key. You can update all fields by pressing Ctrl+A followed by the F9 key.

The cross-reference is also a hyperlink (not formatted to look like one, but it acts like one). The hyperlink updates automatically.

Complex Documents

The following macro would update all of the REF fields in a document:

Code:
Sub UpdateAllRef()
'   Based on code at http://www.gmayor.com/installing_macro.htm
'   Update all Ref fields in a document, even if in headers/footers
    Dim oStory As Range
    Dim oField As Field
    '
    For Each oStory In ActiveDocument.StoryRanges
        For Each oField In oStory.Fields
            If oField.Type = wdFieldRef Then oField.Update
        Next oField
        '
        If oStory.StoryType <> wdMainTextStory Then
            While Not (oStory.NextStoryRange Is Nothing)
            Set oStory = oStory.NextStoryRange
                For Each oField In oStory.Fields
                    If oField.Type = wdFieldRef Then oField.Update
                Next oField
            Wend
        End If
        '
    Next oStory
    '
    Set oStory = Nothing
    Set oField = Nothing
End Sub
For instructions on using a macro, see Installing Macros.

Last edited by Charles Kenyon; 07-24-2014 at 05:31 AM. Reason: changed macro to allow for multiple stories
Reply With Quote