Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

saving page using OLECMDID_SAVE in webbrowser control

Posted on 1998-11-12
4
Medium Priority
?
2,652 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
[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
  • 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

704 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