VBA to save a sheet to a password protected PDF

会有一股神秘感。 提交于 2019-12-07 17:00:41

问题


The following saves the activesheet as a PDF:

ActiveSheet.ExportAsFixedFormat _
                               Type:=xlTypePDF, _
                               Filename:="C:\blahblah2.pdf",  _
                               Quality:=xlQualityStandard, _
                               IgnorePrintAreas:=False, _
                               OpenAfterPublish:=False

I need to be able to create a password protected PDF - is this possible using VBA without buying any additional software?


回答1:


I used PDFsharp using VS - my project is in C# ... this free library works very well



来源:https://stackoverflow.com/questions/12373631/vba-to-save-a-sheet-to-a-password-protected-pdf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!