I have created a pdf from Excel using VBA and I found some codes, wherein we can protect the excel sheet. But, can we create a password protected PDF using VBA?
Please try the below link which has a VBA code to protect the PDF with password. However it requires a PDFCreator reference to make it work easy. If this doesn't work, please post your code of PDF creation as I can give a try to check for the security options. Thanks.