已将一系列单元格作为图片复制到单独的工作表here.中,单元格的范围基于在另一个工作表上的自我选择自动填充-因此,这有效地构建了一系列希望成为的图像和指示符包。
现在已经写了一些要导出到PDF -打印区域使用偏移功能,这取决于选择的指标数量。
但是,导出到PDF运行,但没有拿起图片-你能帮忙吗?
Sub printPDFSave()
Dim rng As Range
Dim fPathFile As Variant
Set rng = [Destination]
fPathFile = Application.GetSaveAsFilename(filefilter:="PDF Files (*.pdf), *.pdf")
If fPathFile <> False Then
rng.ExportAsFixedFormat Type:=xlTypePDF, Filename:=fPathFile, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End If
End Sub发布于 2017-09-27 08:04:23
请尝试below..we,假设图像在sheet2中
Option Explicit
Sub printPDFSave()
Dim rng As Range
Dim fPathFile As Variant
Dim sh As Shape
Dim ShRow As Long
For Each sh In Sheet2.Shapes
ShRow = sh.BottomRightCell.Row
Nex
Set rng = Sheet2.Range("A1:K" & ShRow)
fPathFile = Application.GetSaveAsFilename(filefilter:="PDF Files (*.pdf), *.pdf")
If fPathFile <> False Then
rng.ExportAsFixedFormat Type:=xlTypePDF, Filename:=fPathFile, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
End If
End Subhttps://stackoverflow.com/questions/46441871
复制相似问题