I can generate a PDF format file but i want to be encrypted to be sent to email attachement. Is there anyway to generate encrypted file in Access?
I can generate a PDF format file but i want to be encrypted to be sent to email attachement. Is there anyway to generate encrypted file in Access?
Do you mean password protection?
VBA code can create an Excel workbook and set password protection. VBA code can also manipulate PDF file so I am guessing could set password.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Yes, password protection. Is ther any link how to do it. I can generate the PDF file but i don't know how to manipulate to set a password. I appreciate your help.
I don't know a specific source for code. I learned how to manipulate PDF as an object in VBA by searching web for code. I don't have those web links.
Here is excerpt from my code:
This requires setting VBA reference to Adobe Acrobat 10.0 Type Library.Code:Dim pdfDoc As Acrobat.AcroPDDoc Set pdfDoc = New Acrobat.AcroPDDoc rs.Open "SELECT * FROM PDFpage2error ORDER BY StateNum, Item;", CurrentProject.Connection, adOpenDynamic, adLockPessimistic While Not rs.EOF strPath = "R:\Projects\LabReportsTemp\" & rs!StateNum & "\" & rs!MatType & _ IIf(rs!MatType Like "Soils*", "\ItemGroup" & rs!ItemGroup, "") & "\" & rs!LABNUM & ".pdf" If Dir(strPath) <> "" Then pdfDoc.Open strPath pdfDoc.DeletePages 1, 1 'page index is 0 based pdfDoc.Save 1, strPath pdfDoc.Close End If rs.MoveNext Wend
Whether or not code can set properties (such as password) of PDF file, I can't say - never explored that.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.