View Single Post
 
Old 11-26-2025, 02:21 PM
gmaxey gmaxey is offline Windows 10 Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,636
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Why not create a single building block with the necessary field codes. E.g.,


Select your existing footer construction. Save it as MyFooterLastPageBB


Then simply use:

Code:
Sub InsertFooterPageII()
Dim HdFt As HeaderFooter, Rng As Range
  Application.ScreenUpdating = False
  For Each HdFt In ActiveDocument.Sections.Last.Footers
    If HdFt.Exists Then
      Set Rng = HdFt.Range
      'Replace NormalTemplate as necessary to reflect where your BB is stored.
      NormalTemplate.BuildingBlockEntries("MyFooterLastPageBB").Insert Rng, True
    End If
  Next HdFt
  Application.ScreenUpdating = True
lbl_Exit:
  ExitSub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote