Dear All,<br><br>I've a macro which allows me to populate the data of the excel sheet to word, convert it into pdf &amp; then send it to clients using the default email address in outlook. The macro does allow to send the pdf, however, I'm finding no solution to password protect the pdf &amp; it's necessary for us to do the same. I've pasted the code which generates word document & converts it into pdf below:

Code:
'Save Word Document'-------------------------------------------------------------------------------------------------
    objword.ChangeFileOpenDirectory base_directory
        objword.ActiveDocument.SaveAs2 Filename:=name & "_" & clientno & ".docx", FileFormat:= _
            wdFormatXMLDocument, LockComments:=False, Password:="", AddToRecentFiles _
            :=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts _
            :=False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
            SaveAsAOCELetter:=False, CompatibilityMode:=14
'-------------------------------------------------------------------------------------------------


'Save PDF
'-------------------------------------------------------------------------------------------------
        objword.ActiveDocument.ExportAsFixedFormat OutputFileName:=base_directory & name & "-" & clientno & ".pdf", _
        ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
        wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _
        Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
        CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
        BitmapMissingFonts:=True, UseISO19005_1:=False
            
    objword.Quit
'--------------------------------------------------------------------------------------------------
Please let me know if I can make any changes to the pdf code which will allow me to password protect it &amp; set custom password for every client