我正在尝试从 Excel 工作表发送图片,但尺寸非常小。
我怎样才能获得合适的尺寸(基本上是整个屏幕)?
这是代码:
Sub send_as_a_pic()
'Copy range of interest
Dim r As Range
Set r = Range("B2:O23")
r.Copy
'Open a new mail item
Dim outlookApp As Outlook.Application
Set outlookApp = CreateObject("Outlook.Application")
Dim outMail As Outlook.MailItem
Set outMail = outlookApp.CreateItem(olMailItem)
With outMail
.To = "[email protected] /cdn-cgi/l/email-protection"
.CC = ""
.BCC = ""
.Subject = "PAC 2017 sales up to date"
End With
'Get its Word editor
outMail.Display
Dim wordDoc As Word.Document
Set wordDoc = outMail.GetInspector.WordEditor
'To paste as picture
wordDoc.Range.PasteAndFormat wdChartPicture
'With wordDoc.Range
' .LockAspectRatio = True
' .Top = wordDoc.Top
' .Left = wordDoc.Left
'.Height = wordDoc.RowHeight
'End With
End Sub
其实很简单,在 develppez.com 上找到答案:
For Each shp In wordDoc.InlineShapes
shp.ScaleHeight = 90
shp.ScaleWidth = 90
Next
谢谢你!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)