以下程式碼作用是將excel範圍,貼至outlook信件內文圖片,並設定圖片大小。
但網路上我找不到「文繞圖」的程式碼,想請教如果我想設定圖片的文繞圖為「上及下」,是否有VBA程式碼可達成?謝謝~
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