Results 1 to 3 of 3

Thread: Using menu bar item of IE from programmer

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Hong Kong
    Posts
    38
    An application program can create an instance of Internet Explorer, browse to a site and access the HTML of web pages. But is it possible that the application simulates the action of clicking the File menu item to save the page to hard disk so that later we can double click the saved file to view its content ?

  2. #2
    Guest
    To save a page with the WebBrowser Control, this code should work.


    Code:
    WebBrowser1.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_PROMPTUSER

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Hong Kong
    Posts
    38
    Matthew,

    Thanks for your advice.

    I tried the code and it prompted me to specify folder to save the page.

    However, what I really needed was to run the program unattended. Therefore I changed the coding as follow :

    IEObj.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_DONTPROMPTUSER, "C:\test.html"

    But the "DONTPROMPTUSER" did not work. The program asked me to select the folder to save the file. I suspected that I coded the pvaIn parameter wrongly. Could you please advise me how to code it ?

    Thanks.

    Terence

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