如何利用宏让Excel 2010另存为PDF时,文件名指定为某一单元格内容?
发布网友
发布时间:2022-04-23 06:49
我来回答
共1个回答
热心网友
时间:2023-10-06 04:19
activeworkbook.saveas
"e:\"
&
[a1]
&
".pdf"
试下面这两段,不知道版本,不确定哪个好用
ActiveSheet.ExportAsFixedFormat
Type:=xlTypePDF,
Filename:="D:\另存为.pdf",
Quality:=xlQualityStandard,
IncludeDocProperties:=True,
IgnorePrintAreas:=False,
OpenAfterPublish:=False
ActiveDocument.ExportAsFixedFormat
OutputFileName:="D:\Doc1.pdf",
_
ExportFormat:=wdExportFormatPDF,
OpenAfterExport:=False,
OptimizeFor:=
_
wdExportOptimizeForPrint,
Range:=wdExportAllDocument,
From:=1,
To:=1,
_
Item:=wdExportDocumentContent,
IncludeDocProps:=True,
KeepIRM:=True,
_
CreateBookmarks:=wdExportCreateNoBookmarks,
DocStructureTags:=True,
_
BitmapMissingFonts:=True,
UseISO19005_1:=False