Solved

Saving HTML page as file with WebBrowser

Posted on 2000-03-08
10
250 Views
Last Modified: 2013-11-13
I could hardly find any documentation about the WebBrowser control.
How can I save an HTML page as a local file using the WebBrowser control ?
I can't do it with the Inet control, or using winsock since the page I'd like to save requires a cookie, received when accessing another HTML page. Therefore I'd like to navigate to the first page, get the cookie, and then navigate to the second page, and save it from the webbrowser contorl.
Other suggestions of doing it would be also gladly accepted.
0
Comment
Question by:xoz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 32

Expert Comment

by:Erick37
ID: 2599138
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2599290
To save the webpage, you can do this:

   webbrowser1.ExecWB OLECMDID_SAVEAS,OLECMDEXECOPT_PROMPTUSER


The WebBrowser Help file is on the Visual Basic CD, however it does not get installed when you install VB.

It is located on the CD at:

   \TOOLS\UNSUPPRT\WEBBRWSR



Cheers!®©
0
 

Author Comment

by:xoz
ID: 2610232
Adjusted points to 70
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

Author Comment

by:xoz
ID: 2610233
This doesn't help me. I'd like to save the page without the "Save Web Page" dialog box, without the user having to press enter or write the filename.

brwWebBrowser.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_DONTPROMPTUSER pops that dialog box as well.
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2611193
Yes, the ExecWB pops up the dialogbox in both cases... In your original question you didn't mention anything about saving automatically...

On the Visual Basic CD there is a project in the \TOOLS\UNSUPPRT\HTTPEXPL directory... Load that project and see if that helps you...


Cheers!®©
0
 

Author Comment

by:xoz
ID: 2617341
I could find this directory on the Visual Studio CD !
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2617457
I can Email you the project if you want it...
0
 

Author Comment

by:xoz
ID: 2617535
Send it to yogevm@ascalar.co.il please!
0
 
LVL 14

Accepted Solution

by:
mcrider earned 70 total points
ID: 2617754
I sent it to your mailbox...


Cheers!®©
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2654690
Thanks for the points! Glad I could help!


Cheers!®©
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The viewer will learn how to implement Singleton Design Pattern in Java.
This video teaches viewers about errors in exception handling.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question