1

The below is the line of code I'm using it currently which converts ppt to pdf, however I want to protect pdf , Is there any possibility

PowerPointapp.ActivePresentation.SaveAs path & pdffileNm & ".pdf", 32

NishuSruj
  • 41
  • 4
  • My entire code is doing everything I need like open ppt, update bookmark, save as pdf , but the only problem is I want to add password to file. – NishuSruj Oct 27 '22 at 10:50

2 Answers2

1

This is not possible with the default vba functions available!

See this, not tested by me, example of using an external library to save pdf with password in the past.

Sunfile
  • 101
  • 1
  • 4
  • 22
  • I have tested the code in the above link.....it doesnt work..any other alternative – NishuSruj Oct 27 '22 at 12:46
  • Hello Everyone, I'm not able to post new question. Here is something I would like to check. I ran the code and it is working absolutely fine, when sent to requestor it shows the error presentation (unknown member) . Can anyone help? – NishuSruj Oct 27 '22 at 14:55
0

Protecting a PDF is not permanent, once the file is opened (using the users decryption key provided by handing over the password), the contents are available to the new owner to add comment or fill forms or otherwise modify by print or text edit or remove watermarks.

Adobe reader will use different parts of those keys to reduce user writes, but no other editor has to.

Browsers need to edit PDF in exactly the same way so my Firefox pdf reader allows me to correct / change web page content or the embedded pdf contents, exactly the same as any other browser or pdf viewer or editor can. The only protected PDF is an unpublished one.

K J
  • 8,045
  • 3
  • 14
  • 36