使用vba将ccelrting excel加入受密码保护的PDF [英] Conerting excel into password protected PDF using vba

查看:206
本文介绍了使用vba将ccelrting excel加入受密码保护的PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要vba代码才能将Excel转换为受密码保护的PDF 文件。

I need vba code for converting excel to password protected PDF  file.

紧急。

提前致谢

问候,

Shweta

推荐答案

您好Harjit,

Hi Harjit,

感谢您发帖。

据我所知,Excel公开了SaveAs PDF文件的方法,但它没有提供保护PDF文件的方法:

As far as I know, Excel expose the method SaveAs PDF file, but it didn't provide the way to protect the PDF file:

ActiveSheet。 ExportAsFixedFormat类型:= xlTypePDF,文件名:= _

        "C:\ workbook1.pdf",质量:= xlQualityStandard,_

        IncludeDocProperties:= True,IgnorePrintAreas:= False,OpenAfterPublish:= _
$
       真的

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

希望这可以帮助你,并且在你尝试之后随时跟进。

Hope this can help you and just feel free to follow up after you have tried.

最好的问候,

 


这篇关于使用vba将ccelrting excel加入受密码保护的PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆