S
StevenM
I would like to create a header so that: “Add Title Here†appears on the left
side of the page, and “Page {PAGE}†appears on the right side of the page. So
far I got:
Sub AddHeader()
Dim oRange As Range
Set oRange = ActiveDocument.Range(Start:=ActiveDocument.Range.Start,
End:=ActiveDocument.Range.End)
With oRange.Sections(1).Headers(wdHeaderFooterPrimary).Range
..Delete
..Paragraphs.Alignment = wdAlignParagraphLeft
..InsertAfter "Add Title Here" & vbTab & vbTab & "Page "
End With
End Sub
I would like a page number to follow: "Page ", I wish I could just add: &
vbPageNumber, but I suspect that it will be more complex than that.
Any help will be greatly appreciated.
Steven Craig Miller
P.S. I apologize for having wrongly placed a duplicate message in Word Tables.
side of the page, and “Page {PAGE}†appears on the right side of the page. So
far I got:
Sub AddHeader()
Dim oRange As Range
Set oRange = ActiveDocument.Range(Start:=ActiveDocument.Range.Start,
End:=ActiveDocument.Range.End)
With oRange.Sections(1).Headers(wdHeaderFooterPrimary).Range
..Delete
..Paragraphs.Alignment = wdAlignParagraphLeft
..InsertAfter "Add Title Here" & vbTab & vbTab & "Page "
End With
End Sub
I would like a page number to follow: "Page ", I wish I could just add: &
vbPageNumber, but I suspect that it will be more complex than that.
Any help will be greatly appreciated.
Steven Craig Miller
P.S. I apologize for having wrongly placed a duplicate message in Word Tables.