本文介绍了如何保持“internetexplorer.application”的引用。在ie8中导航之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我对IE8"internetexplorer.application"有疑问。对象,我想使用以下代码,因为它工作,直到ie7在javascript(或vb)中打印html网站


Hello,
i have a problem with the IE8 "internetexplorer.application" object, i want to use following code as it works until ie7 to print a html site in javascript (or vb)

  IE = new ActiveXObject("InternetExplorer.Application");

.
.
.
  with (IE) {
    Navigate(HTMLFile);
    Visible = false;
    while(ReadyState != READYSTATE_COMPLETE) sleepms(200);
    ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER);
  }


它适用于使用IE7的vista,但不适用于带有IE8的Win7。

问题是IE.Navigate执行后我丢失了对IE对象的引用,我尝试使用"导航"带有标志

navOpenInNewTab
navOpenInBackgroundTab
navVirtualTab

但是没有任何帮助,我总是丢失参考,在IE之后用欺骗者检查。他们显示他们显示我是一个"空"的参考文件。

任何建议对此有什么影响?

非常感谢恭敬的问候马库斯

It works on vista with IE7, but not on Win7 with IE8.

The problem is after IE.Navigate executed i lost the reference to the IE Object, i try to use "Navigate" with flags

navOpenInNewTab
navOpenInBackgroundTab
navVirtualTab

But nothing helps, i always lost the reference, checked with the deugger, after IE.Navigate they show me a "empty" reference..

Any suggestions on that ?

Thanks a lot
regards
Marcus


推荐答案


这篇关于如何保持“internetexplorer.application”的引用。在ie8中导航之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 18:00