"原"是收件箱中的电子邮件,其中包含一个未填充最后一列的表格。 我如何粘贴" oElColl"在"回复" ???
Dim Reply As Outlook.MailItem
Dim Original As Outlook.MailItem
Set Original = Application.ActiveExplorer.Selection(1)
Set Reply = Original.ReplyAll
Reply.Subject = "RE: " & Original.Subject
Reply.Display
Dim oHTML As MSHTML.HTMLDocument: Set oHTML = New MSHTML.HTMLDocument
Dim oElColl As MSHTML.IHTMLElementCollection
With oHTML
.Body.innerHTML = Original.HTMLBody
Set oElColl = .getElementsByTagName("table")
End With
'填写oElColl
中最后一列的代码答案 0 :(得分:0)
将HTML同步加载到HTMLDocument对象中没有简单的100%万无一失的方法。我非常怀疑HTMLDocument.Body.innerHTML = Original.HTMLBody会起作用。您可以使用HTMLDocument.write,但它可以挂起一些HTML消息。
尝试使用MailItem.GetInspector()。WordEditor来检索Word文档对象并改为使用它。