Results 1 to 3 of 3

Thread: Launching local web page from form

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Cambridge, UK
    Posts
    5

    Post

    I want the user of my app to launch a web browser with a locally stored HTML file (e.g. 'F' drive) from a form control. I've tried using the code below, but this fails as the browser edit line automatically starts with http:\\. Can this be done?

    Returnvalue = Shell("C:\Program Files\Internet Explorer\iexplore.exe - file://BookByte\Review.html", 1)

    Thanks for any help,

    Alan

  2. #2
    Junior Member
    Join Date
    Mar 1999
    Location
    Harrington, DE USA
    Posts
    21

    Post

    Just try the filename for the shell ie.

    Returnvalue = Shell("Review.html", 1)

    It should automatically load into the default web browser.

    HTH,
    XinMan

    [This message has been edited by XinMan (edited 02-19-2000).]

  3. #3
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Post

    Hi AlanRCo,

    I've got 2 ideas of how to do this.

    1) Use the AppActivate Statement to give Explorer the focus. Use Sendkeys to mimic pressing Alt-D to give the focus to the Address bar. Use Sendkeys to enter your network URL and then Enter.

    2) Use the Webbrowser control (Microsoft Internet Controls) from the Components list. You can go directly to the html page with this code:
    Code:
    webbrowser1.navigate "F:\yournetworkfile.htm"
    I haven't tried the first method, but I know that the second 1 works.

    All the best.

    ------------------
    OneSource
    The truth may be out there, but it's in here too!
    .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width