View Single Post
 
Old 02-09-2023, 09:30 AM
Ddadoo57 Ddadoo57 is offline Windows 11 Office 2021
Advanced Beginner
 
Join Date: Feb 2023
Posts: 90
Ddadoo57 is on a distinguished road
Default

Yes thanks to Graham gmayor !!!


' first footer
ActiveDocument.AttachedTemplate.BuildingBlockEntri es("PDPVF1").Insert Where:=ActiveDocument.Sections(1).Footers(2).Range , RichText:=True

' second footer, even-numbered pages
ActiveDocument.AttachedTemplate.BuildingBlockEntri es("PDPVF1").Insert Where:=ActiveDocument.Sections(1).Footers(3).Range , RichText:=True

' third footer, odd-numbered pages
ActiveDocument.AttachedTemplate.BuildingBlockEntri es("PDPVF1").Insert Where:=ActiveDocument.Sections(1).Footers(1).Range , RichText:=True


' PDPVF1 is a buildingblock constructed by having selected the desired formatted text written before in the document, including whole the content of IF field :
' PDPVF1 ==> {IF {PAGE} = {NUMPAGES} "my formatted text"}
' OR
' PDPVF1 ==> {IF {PAGE} = {NUMPAGES} {AUTOTEXT YOURAUTOTEXTFORMATTED}}
Reply With Quote