I am trying to encrypt a PDF file in Excel VBA . I can not find the correct syntax to do this. Can anyone help me with this? Is there any reference material regarding encryption in VBA?
I am using PDFcreator 1.5.1, Windows 7 and Ms Office 2010
Ok solved my own problem. Here is the proper syntax.
I would love to find proper documentation on use of these options still.
With pdfjob
.cOption(“PDFDisallowCopy”) = 1 'Disallow copying
.cOption(“PDFDisallowModifyContents”) = 1 'Disallow Modify contents
.cOption(“PDFEncryptor”) = 0
.cOption(“PDFUseSecurity”) = 1
.cOption(“PDFHighEncryption”) = 1
.cOption(“PDFOwnerPass”) = 1
.cOption(“PDFOwnerPasswordString”) = “xxx”
.cClearCache
End With
Hi,
there are some examples for VBS which is similar in the COM folder in the PDFCreator path.
Maybe you have found this allready but there is some documentation here:
http://www.pdfforge.org/content/com-interface
regards,
Robin