Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open an HTML file from PB App

Status
Not open for further replies.

tinac99

Programmer
Jan 17, 2002
58
US
hi,

I am trying to open an html file named "c:\program files\sample.htm" from a PB application, to be displayed to the screen.
I tried the following code:

oleobject ole_doc
ole_doc = create oleobject
ole_doc.ConnectToNewObject"InternetExplorer.Application.1")
ole_doc.Documents.Open("c:\program files\sample.htm")

The last line returns the error "Name not found accessing external object property documents." But the path and filename exists in the computer.

Can anyone tell me what's wrong with my script or suggest a workaround?

Thanks...
 
Can you not use the PB OLE Control, specifying the MS browser ole control?

If that's not viable, I got the ole object to load the document using
Code:
ole_doc.Navigate("c:\program files\sample.htm")
instead.

Check the PB object browser OLE tab.

This site exposes a few of the ie ole object methods available :
Code:
[URL unfurl="true"]http://www.macromedia.com/support/authorware/activex/anatomy/anatomy_07.html[/URL]
Might help.

Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top