Hello
We use this VBA code in our footer where it exports to a word document, but is there a way i can add a page number aswell?
We use this VBA code in our footer where it exports to a word document, but is there a way i can add a page number aswell?
VBA Code:
' Add text to footer in left-aligned
footerText = " Company info "
' Add footer to the document
With wddoc.Sections(1).Footers(1).Range ' wdHeaderFooterPrimary = 1
.Text = footerText
.ParagraphFormat.Alignment = wdAlignParagraphLeft ' Left-align the footer
.Font.Name = "Century Gothic"
.Font.Size = 10
.Font.Color = RGB(56, 56, 56) ' Dark grey/black color
' Removed the left indent for no spacing
.ParagraphFormat.SpaceAfter = 1 ' No space after the footer
.ParagraphFormat.SpaceBefore = 0 ' No space before the footer
End With