Hi
I am trying to insert text into a header without overwriting the existing header. My document currently has a logo and a small table in the document header. The code below adds text in the required position but it overwrites the existing header. I wondered if it's possible to add text without overwriting? I've tried to search the web but can't find any info about this.
Any help would be really appreciated.
Thanks
I am trying to insert text into a header without overwriting the existing header. My document currently has a logo and a small table in the document header. The code below adds text in the required position but it overwrites the existing header. I wondered if it's possible to add text without overwriting? I've tried to search the web but can't find any info about this.
VBA Code:
Sub HdrTest()
With ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary)
Set HeaderRange = ActiveDocument.Sections.Item(1).Headers(wdHeaderFooterPrimary).Range
HeaderRange.Text = "Text 1" & vbTab & vbTab & "Text 2" & vbNewLine & "Text 3" & vbTab & vbTab & "Text 4"
With HeaderRange.Font
.Name = "Arial"
.Size = 8
End With
ActiveDocument.Sections(1).PageSetup.HeaderDistance = CentimetersToPoints(0.2)
End With
End Sub
Any help would be really appreciated.
Thanks