首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >复制后未导出到PDF的Excel图像

复制后未导出到PDF的Excel图像
EN

Stack Overflow用户
提问于 2017-09-27 07:27:24
回答 1查看 438关注 0票数 0

已将一系列单元格作为图片复制到单独的工作表here.中,单元格的范围基于在另一个工作表上的自我选择自动填充-因此,这有效地构建了一系列希望成为的图像和指示符包。

现在已经写了一些要导出到PDF -打印区域使用偏移功能,这取决于选择的指标数量。

但是,导出到PDF运行,但没有拿起图片-你能帮忙吗?

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-09-27 08:04:23

请尝试below..we,假设图像在sheet2中

代码语言:javascript
复制
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 Sub
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46441871

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档