Hi,

I have this following code to create individual payslips employee wise. What i need is, I wanna make this PDF to be protected with a password to open.
Is it possible that this can be done through a third party software. The password for each of this payslips will be different. For example their PAN. Which has to be referred differently in a cell for each employee.

Could any one please help me on this?

Call CopyData
    With ActiveWorkbook
    .Worksheets(payslipsheet).Range("A1:G54").ExportAsFixedFormat Type:=xlTypePDF, _
                                              Filename:=MyPath & "\\" & Worksheets(payrollsheetName).Cells(x, empnoCol).Value & "-" & Worksheets("Process").Cells(4, 2).Value, _
                                              Quality:=xlQualityStandard, _
                                              IncludeDocProperties:=True, _
                                              IgnorePrintAreas:=False, _
                                              OpenAfterPublish:=False
    End With