WD97: Run-Time Error '4599' Using DDE to Microsoft Internet Explorer 4.x |
Q178879
In versions of Microsoft Internet Explorer earlier than Microsoft Internet Explorer version 4.x, dynamic data exchange (DDE) commands could be used to extract the Uniform Resource Locator (URL) address from the browser. For instance, the following sample Microsoft Visual Basic for Applications code would display the URL address in a message box:
Sub ShowUrl()
IEchannel = DDEInitiate("iexplore", "www_getwindowinfo")
Info = DDERequest(IEchannel, "dogetwindowinfo")
MsgBox Info
DDETerminateAll
End Sub
This code no longer works with Microsoft Internet Explorer version 4.x and
returns the following error message:
Run-time error '4599': Process failed in other application
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please see the following page on the World Wide Web:
http://www.microsoft.com/partner/referral/For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://support.microsoft.com/directory/overview.aspThe following sample Visual Basic code displays the URL address for each window displayed in the Microsoft Internet Explorer browser:
Sub FindIE40Url()
Dim IEWindows As New SHDocVw.ShellWindows
Dim oIE As SHDocVw.InternetExplorer
On Error GoTo errorhandler
For Each oIE In IEWindows
MsgBox "Caption: " & oIE.LocationName & vbCr & "URL: " _
& oIE.LocationURL
Next
errorhandler:
If Err <> 0 then
MsgBox " Microsoft Internet Explorer must be running" _
& " for this code to work."
End If
End Sub
Note: For this code to work, you must reference the "Microsoft Internet
Controls." To add the "Microsoft Internet Controls" reference, follow these
steps:
For more information about the Microsoft Internet Explorer 3.x Automation object, please see the "Web Browse Objects" documentation available at the following Microsoft World Wide Web site:
http://www.microsoft.com/intdev/sdkNOTE: Because the Microsoft Web site is constantly updated, the site address may change without notice. If this occurs, link to the Microsoft home page at the following address:
http://www.microsoft.com/You can also obtain information about the Microsoft Internet Explorer 3.x Automation object by searching on InternetExplorer Object in the ActiveX SDK online documentation.
http://www.microsoft.com/msdn/sdk/NOTE: Because the Microsoft Web site is constantly updated, the site address may change without notice. If this occurs, link to the Microsoft home page at the following address:
-and-
http://www.microsoft.com/intdev/sdk/
http://www.microsoft.com/
For more information about getting help with Visual Basic for Applications, please see the following article in the Microsoft Knowledge Base:
Q163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: wordcon vba
Keywords : kbcode kbprogramming kbwordvba
Issue type : kbprb
Technology : kbWordSearch kbWord97 kbWord97Search kbZNotKeyword2
|
Last Reviewed: December 30, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |