【问题标题】:Saving a range to pdf in a specific location在特定位置将范围保存为 pdf
【发布时间】:2015-03-14 03:58:42
【问题描述】:

我需要在电子邮件中发送一系列单元格,但格式为 pdf 文件。现在我能够创建 pdf 并保存它,但由于 excel 文件将在不同的计算机上使用,我现在无法找到文件的路径并以这种方式附加它。是否可以立即将范围作为 pdf 附加到电子邮件中?或者提示一个窗口,以便用户选择保存 pdf 的位置,然后我可以使用该路径将其附加到电子邮件中。 谢谢!

【问题讨论】:

标签: excel vba email pdf


【解决方案1】:

Application.Workbook().Path 应该可以满足您的需求:

Dim FolderPath As String
FolderPath = Application.Workbook("name of book.xlsm").Path
'Use your save PDF macro to save to the FolderPath string
'Reference FolderPath in attachment to message.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-03-08
    • 2020-08-24
    • 1970-01-01
    • 2012-10-15
    • 1970-01-01
    • 2022-11-27
    • 1970-01-01
    相关资源
    最近更新 更多