Da maneira que está, está salvando em formato Woeld(Docx), porem com o sufixo pdf (experimente abrir o arquivo gerado com o world)
Experimente algo do tipo:
Private Sub btn_montar_contrato_Click()
Dim WORD As WORD.Application
Dim DOC As WORD.Document
Dim Fname As String
Set WORD = CreateObject("Word.Application")
WORD.Visible = False
Set DOC = WORD.Documents.Open("C:Planilha VBAPlanilha ExcelVBAcontrato.docx")
With DOC
Fname = [S2].Value & [C5].Value & " " & [E5].Value & ".pdf"
If Dir(Fname) <> "" Then Kill Fname
.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"Fname, Quality:=xlQualityStandard, includeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True"
'.SaveAs ([S2].Value & [C5].Value & " " & [E5].Value & ".pdf")
'.Close
End With
'....
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 12/05/2017 5:50 am