Quote:
Originally Posted by Swarup
What screen should be open in front of me when I do Shift-F9? I tried that combination when my MS Word document was open and I was looking at the end of the file on page 305 i.e. the index. But nothing happened when I pressed Shift-F9.
|
You should
select the Index. What part of 'select' don't you understand?
As for re-doing the page numbering, try the following macro:
Code:
Sub Main()
Application.ScreenUpdating = False
Dim Sctn As Section, HdFt As HeaderFooter
For Each Sctn In ActiveDocument.Sections
For Each HdFt In Sctn.Headers
Call UpdateHeaderFooter(Sctn, HdFt)
Next
For Each HdFt In Sctn.Footers
Call UpdateHeaderFooter(Sctn, HdFt)
Next
Next
Application.ScreenUpdating = True
End Sub
Sub UpdateHeaderFooter(Sctn As Section, HdFt As HeaderFooter)
Dim Rng As Range, Fld As Field
With HdFt
If .Exists = True Then
If (Sctn.Index = 1) Or (.LinkToPrevious = False) Then
.PageNumbers.NumberStyle = wdPageNumberStyleArabic
For Each Fld In .Range.Fields
With Fld
If .Type = wdFieldPage Then
Set Rng = .Result
.Delete
With Rng
.Text = "-" & ChrW("&H202F") & " " & ChrW("&H202F") & "-"
.Fields.Add .Characters(3), wdFieldEmpty, "PAGE", False
End With
Exit For
End If
End With
Next
End If
End If
End With
End Sub