Link to home
Start Free TrialLog in
Avatar of Wayne Barron
Wayne BarronFlag for United States of America

asked on

WebBrowser - Open a HTML File from Directory on computer

Hello All;

 I feel stupid asking this guestion, as I use to know how to do it.
But have forgotten.

The program is going to be installed into what ever directory that
The User chooses, as we all know, only a hand full of people
Leave it to install in the Default directory.

OK.

  I have tried this:

WB.Navigate('MyFile.html');
This does not work.

The file is going to be located in the same folder that the .exe file is at.

Any idea's

Wayne


Avatar of ezraa
ezraa

The directory that your .exe is in can be found by:

 ExtractPath(Application.ExeName);
Avatar of Wayne Barron

ASKER

Hello "ezraa"

  Thank you for the information.
  Would you have an idea of how to write the code
  To make the file open in WebBrowser?

  I will do some research on what you have here.
ASKER CERTIFIED SOLUTION
Avatar of ezraa
ezraa

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you so very much.

That is the same code that I used before.
But just could not remember it.

Thank you once again.

Wayne