我正在尝试将一系列单元格复制为图片,将该图片放入电子邮件中,然后使用Excel宏发送电子邮件。
我能够完成所有这些,但是图像比原始图像更小/更模糊。我尝试了各种复制/粘贴方法,但结果是一样的。
当我手动复制图片时,副本为图片(如屏幕所示),没有宏,然后使用ctrl + v粘贴到outlook中,图像看起来很好。
知道为什么会这样吗?
以下是代码:
Sub SendMail()
Dim aOutlook As Object
Dim aEmail As Object
Dim rngeAddresses As Range, rngeCell As Range, strRecipients As String
Dim rngeData As Range
Set aOutlook = CreateObject("Outlook.Application")
Set aEmail = aOutlook.CreateItem(0)
Set rngeData = Worksheets("Promo Sync").Range("A5:Y86")
'Copy Range
rngeData.CopyPicture Appearance:=xlScreen, Format:=xlPicture
Dim wordDoc As Word.Document
Set wordDoc = aEmail.GetInspector.WordEditor
'Paste picture
aEmail.Display
wordDoc.Range.Paste
Set rngeAddresses = ActiveSheet.Range("AK2:AK23")
For Each rngeCell In rngeAddresses.Cells
strRecipients = strRecipients & ";" & rngeCell.Value
Next
'Set Subject
aEmail.Subject = "Promo Sync " & Now()
'Set Recipient
aEmail.To = strRecipients
'Send Mail
aEmail.Send
End Sub
答案 0 :(得分:0)
尝试 wordDoc.Range.PasteAndFormat wdPasteEnhancedMetafile
然后 wdPasteDataType
这应该为您提供高品质{{1}},类似于 Ctrl + V