以下程式碼是複製範圍以圖片貼上至OUTLOOK信件,想請教2個問題:
以上求解~~~謝謝
Sub test()
Range("B2:H8").Select
Selection.Copy
Dim wordDoc As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = ""
.Subject = ""
.Display
Set wordDoc = OutMail.GetInspector.WordEditor
wordDoc.Range(Start:=0, End:=1).PasteAndFormat 13
End With
End Sub
Sub test()
Dim wordDoc As Object
Range("B2:H8").Select
Selection.Copy
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = ""
.Subject = ""
.Display
Set wordDoc = OutMail.GetInspector.WordEditor
wordDoc.Range(Start:=0, End:=1).PasteAndFormat 13
wordDoc.InlineShapes(1).LockAspectRatio = msoFalse
wordDoc.InlineShapes(1).Height = 5 * 28.35
wordDoc.InlineShapes(1).Width = 16 * 28.35
End With
End Sub
28.35 應該是營幕點數換算公分的倍數,可能和你的不同,你可設定斷點在 end with 那然後看看 wordDoc.InlineShapes(1) 內的 height 及 width.
文繞圖找不到.