Solved

saving page using OLECMDID_SAVE in webbrowser control

Posted on 1998-11-12
4
2,556 Views
Last Modified: 2012-06-27
I am creating a control that downloads a web page.  I use webbrowser control to do this job.  When the download of the page is completed, I would like to automatically save this page in a directory specified.  I tried to use following command: WebBrowser1.ExecWB OLECMDID_SAVE, OLECMDEXECOPT_DONTPROMPTUSER, "c:\temp"
This didn't work.  Only way I can get any kind of Save is using OLECMDID_SAVEAS.  Is this possbile using VB? Or do I need to look at VC++?
0
Comment
Question by:pkresge
  • 2
4 Comments
 
LVL 4

Expert Comment

by:idcanada
ID: 1444546

Alot of problems have came out with WebBrowser1.ExecWB method.
However, you code is okay, you just need to give the
WebBrowser Object the focus.

Not as easy as it sounds,
the setfocus will not also work.

Right now, your button that calls WebBrowser1.ExecWB has the focus.

0
 

Author Comment

by:pkresge
ID: 1444547
Even after I gave focus to the webbrowser control( MS Article ID: Q176400 ) the method didn't save the page.  Now I am looking at automating OLECMDID_SAVEAS with dialog window.  Is there a better way?
0
 
LVL 4

Accepted Solution

by:
idcanada earned 200 total points
ID: 1444548

With the dialog Window, all the use has to do is enter his filename and
bingo. File has been saved and at least he knows where it is.

Regards
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1444549
Bought This Question.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now