How To Controlling the Currently Running Instance of IE3 via DDE This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
This article was previously published under Q160976 SUMMARY
In some instances you may want to control Internet Explorer from another
application, typically to navigate to a specific URL. One way you can do
this is through the InternetExplorer OLE Automation object that Internet
Explorer exposes. However, this method always launches a new instance of
Internet Explorer, which may not necessarily be the desired behavior.
OLE Automation allows an application to connect to an instance of some object type that is already running through the Running Object Table (ROT). However, InternetExplorer, version 3.01 and earlier, does not register itself in the ROT, and therefore, cannot be controlled in this manner. The only way to currently do this with Internet Explorer is through DDE. MORE INFORMATION
Using the Win32 SDK's DDEML\CLIENT sample, one can easily verify that DDE
with Internet Explorer is fairly straightforward, as long as the correct
information is specified. To tell Internet Explorer to navigate to a
specific URL, for instance, you specify the following information in your
DDE transaction:
Application Name = iexplore Topic Name = WWW_OpenURL Item Name = http://www.microsoft.com Transaction Type = EXECUTE or REQUEST (either one works!)Similarly, to get the current URL of a running instance of Internet Explorer, for example, you specify the following information: Application Name = iexplore Topic Name = WWW_GetWindowInfo Item Name = DoGetWindowInfo Transaction Type = REQUESTNote that IE 2.0 and earlier used "mosaic" as its application name, instead of "iexplore" as specified above. For more information about DDE support in Internet Explorer, please see the following article in the Microsoft Knowledge Base: 160957 (http://support.microsoft.com/kb/160957/EN-US/) Dynamic Data Exchange Support in Microsoft Internet Explorer
If launching a new Internet Explorer window is desired, one workaround
would be to use the InternetExplorer automation object, as mentioned in the
SUMMARY section above. For example, you can launch Internet Explorer using
Visual Basic and have it open the Microsoft Web page at
http://www.microsoft.com (http://www.microsoft.com) by doing the following:
For Internet Explorer 3.x, more information on the InternetExplorer automation object can be found under the "Web Browsing Obj" section on the ActiveX SDK page at http://www.microsoft.com/intdev/sdk, (http://www.microsoft.com/intdev/sdk,) or by searching on "InternetExplorer" off of the ActiveX SDK online documentation. For Internet Explorer 4.0, refer to the "Reusing the WebBrowser Control" section under the "Internet Tools and Technologies" book of the Internet Client SDK documentation, or by searching on "InternetExplorer" off of the Internet Client SDK docs index. APPLIES TO
| Article Translations
|


Back to the top
