Internet Explorer自动化错误---使用格式复制XML [英] Internet Explorer Automation Error --- Copy XML with formats
本文介绍了Internet Explorer自动化错误---使用格式复制XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我使用以下代码复制一个带格式的xml。但得到"自动化错误-2147417848(80010108)。调用的对象与其客户端断开连接"。
这里我的主要目的是将格式的xml复制到记事本或excel任何地方但格式化。任何人都可以帮我这个。
Sub Copy_xml()
Dim IE As New InternetExplorer
Dim x
IE。 Visible = True
IE.Navigate(" C:\ Users \jagniho1 \ AppData \ Local \ Temp \ file1.xml")
Application.Wait(Now + Timevalue(") ; 00:00:10"))
Do IE.Busy
循环
IE.ExecWB OLECMDID_SELECTALL,OLECMDEXECOPT_DODEFAULT
IE.ExecWB OLECMDID_COPY,OLECMDEXECOPT_DODEFAULT
ActiveSheet.Paste
结束子
解决方案
我理解的是你需要xml的外观(标记,IE缩进)我是否正确?
应该尝试看看是否还有其他方式...
Hi All,
I am using the below code to copy one xml with formats. But getting the "Automation error -2147417848(80010108). The object invoked has disconnected from its clients".
Here my main aim is to copy an xml with formats to notepad or excel anywhere but with formats. Could anyone please help me on this.
Sub Copy_xml() Dim IE As New InternetExplorer Dim x IE.Visible = True IE.Navigate ("C:\Users\jagniho1\AppData\Local\Temp\file1.xml") Application.Wait (Now + Timevalue("00:00:10")) Do While IE.Busy Loop IE.ExecWB OLECMDID_SELECTALL, OLECMDEXECOPT_DODEFAULT IE.ExecWB OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT ActiveSheet.Paste End Sub
解决方案
What I understand is you need the look of xml (Tagged,Indented by IE) am I correct ?
Shall try and see if any other way...
这篇关于Internet Explorer自动化错误---使用格式复制XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文