excel - 将表情符号插入电子邮件正文 | “弹出”电子邮件工作正常
问题描述
但是我如何编辑在应用程序内部编写的电子邮件,也就是不“弹出”?
Private Sub TransferToEmail(picControl)
On Error GoTo Delete
Dim pictureFilePath As String
pictureFilePath = "Z:\tempPic"
SavePicture picControl.picture, pictureFilePath
Dim olApp As Outlook.Application
Set olApp = GetObject(, "Outlook.Application")
Dim objDoc As Word.Document
Set objDoc = olApp.ActiveInspector.WordEditor
Dim objselect As Word.Selection
Set objselect = objDoc.Windows(1).Selection
objselect.InlineShapes.AddPicture pictureFilePath
Delete:
Dim fso As Object
Set fso = CreateObject("scripting.filesystemobject")
If fso.fileexists(pictureFilePath) Then fso.deletefile ("" & pictureFilePath & "")
End Sub
这在我弹出窗口时有效,但在处理应用程序本身“内部”的新邮件项时无效
解决方案
对于内联响应,使用Explorer.ActiveInlineResponse
/ActiveInlineResponseWordEditor
属性和Explorer.InlineResponse
/InlineResponseClose
事件。使用OutlookSpy查看对象,了解 Outlook 对象模型中可用的内容。