Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

saving page using OLECMDID_SAVE in webbrowser control

Posted on 1998-11-12
4
Medium Priority
?
2,669 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 400 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Suggested Courses

824 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