当我使用下面的代码在单元格中呈现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