Solved

Saving HTML page as file with WebBrowser

Posted on 2000-03-08
10
254 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

688 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