I'm looking to run a Word macro which inserts a footer with filename and date and page number.
The following macro inserts file name, date and page number in the body of the document. How to rewrite for it to insert this in the footer? Greatly appreciate your help :)
'AddFooter Macro
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"FILENAME \p ", PreserveFormatting:=True
Selection.HomeKey Unit:=wdLine
Selection.TypeParagraph
Selection.MoveUp Unit:=wdLine, Count:=1
Selection.TypeText Text:=vbTab
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"PAGE \* Arabic ", PreserveFormatting:=True
Selection.TypeText Text:=vbTab
Selection.InsertDateTime DateTimeFormat:="M/d/yyyy H:mm", InsertAsField:= _
True, DateLanguage:=wdEnglishUS, CalendarType:=wdCalendarWestern, _
InsertAsFullWidth:=False
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.Font.Size = 8
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
Selection.Font.Size = 8
End Sub`