通过直接程序路径在Excel VBA中打开Internet Explorer



我有一个excel宏,用来打开一个internet explorer应用程序并操作该程序。它在相当长的一段时间内运行得很好。然而,我的一些用户发现,他们需要运行64位internet explorer才能保持一些打印偏好(宏会自动打印我们网站上的页面)。如果从链接C:\program Files\internet explorer\IExplore.exe启动internet explorer程序,则宏可以工作。

我以前打开ie程序的代码是:

Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.navigate ("URL")

如何使我的对象ie通过文件路径C:\Program Files\internet explorer\IExplore.exe专门打开internet explorer,并像以前一样将其创建为对象?如果重要的话,我们电脑上安装的网络浏览器是ie9。

所谓的桌面版IE(而不是Metro版)运行64位IE框架,所有IE窗口都是32位的。这是通过Windows默认提供64位(在程序文件中)和32位(在编程文件(x86)中)版本的IE来实现的。微软不希望人们运行桌面版的IE;A: 64位Internet Explorer。64位版本的Internet Explorer 9也不能设置为默认浏览器。

您的Q中的以下内容可能建议了另一种攻击方式:However, some of my users have discovered that they need 64 bit internet explorer running in order to maintain some of their printing preferences:为什么会这样?这与安装的打印机驱动程序的数量有关吗?

最新更新