>>>Hi all
>>>
>>>I'd like to run IE from a menu in one of my applications that calls IE and then navigates to a specific web address. In my last message (which heaps of people responded to) I got some really good feedback - but unfortunately I didn't understand much of it! I've tried to use the ShellExecute() command without much success...
>>>
>>>Does anyone have some sample code that I could perhaps "borrow" that calls IE and navigates the user to a web address????
>>>
>
>Thanks guys,
>
>The following code seems to create an error
>
>oShell = CREATEOBJ('Shell.Application')
>oShell.Open('http://www.levelextreme.com')
>
>"OLE Error Code - Class not registered"
>
You've got to be running on an original Win95 retail distribution, or Win NT prior to SP3, that has never had IE4 installed on it, since IE4 updated the necessary shell components. I'd be very careful to check that the current shell components are installed on the system, especially if this is NT, since there are lots of other things are tied to the .DLLs for Shell version 4.71, which introduced the Shell.Application object. It can (and IMO, should) be added by apply current SPs or patches as per MS recommendations.
>Don't worry about it, as the solution from Erik seems to work fine. Many thanks to both of you for the response.
>
>Cheers
>
>Chris
>
>>
>>The easiest way to do this would be to use the Shell.Application automation object; going to a URL is as simple as:
>>
>>oShell = CREATEOBJ('Shell.Application')
>>oShell.Open('http://www.levelextreme.com')
>>
>>This pretty much assumes that IE4 or later is installed; if it is, it's virtually certain that Shell.Application is there.
>>
>>You can also install the WebBrowser ActiveX control, or use the FFC ShellExecute class rather than relying on the services of Shell.Application, or any of dozens of other options. Once opened, you can hook the instance of IE that you fired up via the Shell.Application's Windows collection.