Untitled
unknown
plain_text
a year ago
433 B
4
Indexable
' Save the letter as PDF Dim savePath As String savePath = "C:\Path\To\Save\" & recipientName & "_Letter.pdf" On Error Resume Next ' Continue execution if an error occurs wordDoc.SaveAs2 savePath, FileFormat:=17 ' Save PDF with recipient's name On Error GoTo 0 ' Reset error handling If Dir(savePath) <> "" Then ' File saved successfully Else MsgBox "Error: Unable to save the PDF file.", vbExclamation End If
Editor is loading...
Leave a Comment