Thank you. I believe I found some of your code after I posted.
Code:
'Deletes last section of a document including the section break - this fixes the problem with the last page having wrong header/footer
Dim rng As Range
Dim ctr As Integer
Set doc = Wrd.ActiveDocument
ctr = doc.Sections.Count
Set rng = doc.Sections(ctr).Range
Dim hf As HeaderFooter
If ctr > 1 Then
With rng
'Added lines to "inherit" the settings from the next-to-last section
For Each hf In .Sections(1).Headers
hf.LinkToPrevious = True
hf.LinkToPrevious = False
Next
For Each hf In .Sections(1).Footers
hf.LinkToPrevious = True
hf.LinkToPrevious = False
Next
.Select
.MoveStart Unit:=wdCharacter, Count:=-1
.Delete
End With
End If
'--------------This addresses the blank last page-----------
With Wrd.ActiveDocument.Characters.Last
While .Previous.Text Like "[ " & Chr(160) & vbCr & vbTab & Chr(12) & "]"
.Previous.Text = vbNullString
Wend
End With
This works perfectly except when last page is landscape, not it has changed to portrait.
Thank you.