VBA .document.body.createtextrange.exec命令“复制”运行时错误

当我使用下面的代码来在单元格中呈现HTML时,我收到"Run-time error '438': Object doesn't support this property or method"在行.document.body.createtextrange.execCommand "Copy".

有谁知道修复或变通?

 Sub FormatHtmlViaIE() Dim ie As Object, tr, c As Range Set ie = CreateObject("internetexplorer.application") Set tr = Range("B2:F500") With ie .Visible = False .Navigate "about:blank" Do While .busy Loop For Each c In tr .document.body.innerHTML = c.Value .document.body.createtextrange.execCommand "Copy" Selection.Parent.Paste Destination:=c Next c .Quit End With End Sub