lemonhalls
Technical User
I'm currently using this code on two footers.
They are set up as the following on the bottom of the doc
paraMark pageNumber
companyName
I'm trying to get the pageNumber to be at the bottom line and not sure how to get the paraMark to go above the pageNumber. Normally in textBody, I use selection.typeParagraph. But I'm not sure how one would incorporate it in footer.
thanks!
___________________________________
Sub insertPageNumFooter()
Dim mySection As Section
With ActiveDocument
For Each mySection In .Sections
If mySection.Index = 1 Then
.Sections(mySection.Index) _
.PageSetup.DifferentFirstPageHeaderFooter = True
ElseIf mySection.Index = 2 Then
.Sections(mySection.Index) _
.PageSetup.DifferentFirstPageHeaderFooter = True
Else
.Sections(mySection.Index) _
.PageSetup.DifferentFirstPageHeaderFooter = False
'.Sections (mySection.Index) _
'.Footers(wdHeaderFooterPrimary).PageNumbers. _
'Add PageNumberAlignment:=wdAlignPageNumberRight
End If
Next mySection
End With
End Sub
They are set up as the following on the bottom of the doc
paraMark pageNumber
companyName
I'm trying to get the pageNumber to be at the bottom line and not sure how to get the paraMark to go above the pageNumber. Normally in textBody, I use selection.typeParagraph. But I'm not sure how one would incorporate it in footer.
thanks!
___________________________________
Sub insertPageNumFooter()
Dim mySection As Section
With ActiveDocument
For Each mySection In .Sections
If mySection.Index = 1 Then
.Sections(mySection.Index) _
.PageSetup.DifferentFirstPageHeaderFooter = True
ElseIf mySection.Index = 2 Then
.Sections(mySection.Index) _
.PageSetup.DifferentFirstPageHeaderFooter = True
Else
.Sections(mySection.Index) _
.PageSetup.DifferentFirstPageHeaderFooter = False
'.Sections (mySection.Index) _
'.Footers(wdHeaderFooterPrimary).PageNumbers. _
'Add PageNumberAlignment:=wdAlignPageNumberRight
End If
Next mySection
End With
End Sub