Solved

Saving HTML page as file with WebBrowser

Posted on 2000-03-08
10
246 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sending a email via excel using vba 6 82
VB6 ListBox Question 4 44
Publisher:   Unknown     VB.exe Application 1 21
VBA - If Bookmark = "XXBOOKMARKXX" then 15 28
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This video teaches viewers about errors in exception handling.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

770 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