cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft web browser error handling

Former Member
0 Kudos

I'm opening a local PDF file with a Microsoft web browser OLE-object like this:

ole_pdf.Object.navigate('file://'+<filename>)

It works fine so far.

However I would like to get to know if there was anything wrong with the navigate function, for example if the file didn'nt exist.

How can I retrieve that information?

I've gotten all my information about the the web browser ole from here so far: http://www.sybase.com/detail?id=47945

They speak about error events but they have never fired for me under any circumstances.

I'm using PB 12.5 Classic btw!

Best regards, Lucas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Lucas,

I've gotten the NavigateError event to fire if the file is not found.

hth,

Mark

Former Member
0 Kudos

Thank you for confirming this, suddenly it started working for me as well

Answers (1)

Answers (1)

Former Member
0 Kudos

I tried from PB10 on my Windows 7 64bit pc that has IE10 and it works. The NavigateError event is triggered. The argument statuscode = '404' and url is the failed url.

One of the argument names is a PB reserved word which might be causing issues for you. Try using my example webbrowser object:

http://www.topwizprogramming.com/freecode_webbrowser.html

I modified the object structure to avoid issues with reserved names.