View Single Post
 
Old 04-24-2012, 09:02 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi b0x4it,

Word doesn't really have a page-level definition, though it is possible to obtain a page range for processing. A simpler approach is to just select the range you're interested in (could be as little as a single word, or might span two or more pages) and run a macro like the following:
Code:
Sub MMD_MakeSelectedReferencesToJustNumber()
On Error Resume Next
Dim oFld As Field
  For Each oFld In Selection.Fields
    With oFld
      If .Type = wdFieldRef Then
        With .Code
          If InStr(.Text, "\# 0;0") = 0 Then .Text = Replace(.Text, " \h", " \# 0;0 \h")
        End With
      .Update
    End If
  End With
Next oFld
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote