【发布时间】:2019-12-05 11:12:38
【问题描述】:
我希望我的 PDF 文档符合保存条件,尽管在具有指定颜色的工作表中。
我该怎么做?
Sub SavecolorTabtoPDF()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
If Tab Color = "Blue, Accent 1, Darker 25%" Then
'export as pdf
ws.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:="C:\" & Left(ws.Name, Len(ws.Name) - 2) & ".pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End If
Next ws
End Sub
【问题讨论】:
-
我的代码看起来很像这样 - 见上文。
-
嗨,伙计,我现在就去检查一下。我有一个周末:) 谢谢你