Re: Adding AutoText to all headers and footers by Greg
Greg
Thu Aug 31 13:41:14 CDT 2006
Perhaps something like:
Sub ScratchMacro()
Dim oDoc As Document
Dim oRng As Word.Range
Dim oSec As Long
Dim i As Long
Set oDoc = ActiveDocument
For oSec = 1 To oDoc.Sections.Count
With oDoc.Sections(oSec)
For i = 1 To 3
With .Headers(i)
.LinkToPrevious = False
.Range.InsertAfter
oDoc.AttachedTemplate.AutoTextEntries("ATTN:")
End With
With .Footers(i)
.LinkToPrevious = False
.Range.InsertAfter
oDoc.AttachedTemplate.AutoTextEntries("ATTN:")
End With
Next i
End With
Next oSec
End Sub
LunaSlashSea@gmail.com wrote:
> Is there a way to add an autotext entry to ALL headers and footers in a
> document no matter if there is a different first page or not, or if
> there are multiple sections or not?