【发布时间】:2016-04-08 07:49:53
【问题描述】:
我在 Excel 2016 上有一个宏,它非常适合创建 PDF。 但此宏仅适用于 Excel 2016 for Windows。 我在 Mac 的 Excel 2016(最新版本)上尝试了它,但它不起作用。
这是我的宏
Sub Macro1()
Dim Chemin As String
Dim texte As String
Chemin = ThisWorkbook.Path & "/"
texte = Range("C3")
Application.DisplayAlerts = False
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=Chemin & texte & ".pdf", _
Quality:=xlQualityMinimum, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Cells(1, 3).Value = Cells(1, 3).Value + 1
End Sub
我进行了大量搜索,似乎“ExportAsFixedFormat Type:=xlTypePDF”在 Mac 的最新 Excel 版本上不起作用。 但我找不到其他方法。
【问题讨论】:
-
也许这会对你有所帮助:stackoverflow.com/questions/27507253/…