Download PDF files from a website

  • Thread starter Thread starter Henry
  • Start date Start date
H

Henry

I am trying to download some PDF files from a website.

I am using the IWebBrowser2::Navigate Method

m_WebBrowser.Navigate

to get to the site. This works ok and the requested PDF file is displayed in
the window.

Then I am trying to SAVE TO A DIRECTORY the downloaded PDF file that is
currently displayed.

I am using the IWebBrowser2::ExecWB Method

m_WebBrowser.ExecWB(OLECMDID_SAVE, 2, NULL, NULL);

This does not work as far as I can tell. Any ideas?

Henry
 
On Tue, 18 Dec 2007 17:37:00 -0800, Henry
<Henry@discussions.microsoft.com> wrote:

>I am trying to download some PDF files from a website.
>
>I am using the IWebBrowser2::Navigate Method
>
>m_WebBrowser.Navigate
>
>to get to the site. This works ok and the requested PDF file is displayed in
>the window.
>
>Then I am trying to SAVE TO A DIRECTORY the downloaded PDF file that is
>currently displayed.
>
>I am using the IWebBrowser2::ExecWB Method
>
>m_WebBrowser.ExecWB(OLECMDID_SAVE, 2, NULL, NULL);
>
>This does not work as far as I can tell. Any ideas?
>
>Henry


Right click the link and select 'Save As' and maybe a window
will pop up and ask you where you should save it to.

Maybe
 
"WaIIy" wrote:

> On Tue, 18 Dec 2007 17:37:00 -0800, Henry
> <Henry@discussions.microsoft.com> wrote:
>
> >I am trying to download some PDF files from a website.
> >
> >I am using the IWebBrowser2::Navigate Method
> >
> >m_WebBrowser.Navigate
> >
> >to get to the site. This works ok and the requested PDF file is displayed in
> >the window.
> >
> >Then I am trying to SAVE TO A DIRECTORY the downloaded PDF file that is
> >currently displayed.
> >
> >I am using the IWebBrowser2::ExecWB Method
> >
> >m_WebBrowser.ExecWB(OLECMDID_SAVE, 2, NULL, NULL);
> >
> >This does not work as far as I can tell. Any ideas?
> >
> >Henry

>
> Right click the link and select 'Save As' and maybe a window
> will pop up and ask you where you should save it to.
>
> Maybe
>


I am currently using OLECMDEXECOPT_DONTPROMPTUSER in order to avoid any
keyboard intervention.

I am using m_WebBrowser.ExecWB(OLECMDID_SAVE, OLECMDEXECOPT_DONTPROMPTUSER,
NULL, NULL);

so that the PDF files will be stored, one after another, automatically. I am
not sure what to put in place of the NULLs. There seems to be no info
available on this.

Henry
 
On Tue, 18 Dec 2007 18:24:01 -0800, Henry
<Henry@discussions.microsoft.com> wrote:

>
>
>"WaIIy" wrote:
>
>> On Tue, 18 Dec 2007 17:37:00 -0800, Henry
>> <Henry@discussions.microsoft.com> wrote:
>>
>> >I am trying to download some PDF files from a website.
>> >
>> >I am using the IWebBrowser2::Navigate Method
>> >
>> >m_WebBrowser.Navigate
>> >
>> >to get to the site. This works ok and the requested PDF file is displayed in
>> >the window.
>> >
>> >Then I am trying to SAVE TO A DIRECTORY the downloaded PDF file that is
>> >currently displayed.
>> >
>> >I am using the IWebBrowser2::ExecWB Method
>> >
>> >m_WebBrowser.ExecWB(OLECMDID_SAVE, 2, NULL, NULL);
>> >
>> >This does not work as far as I can tell. Any ideas?
>> >
>> >Henry

>>
>> Right click the link and select 'Save As' and maybe a window
>> will pop up and ask you where you should save it to.
>>
>> Maybe
>>

>
>I am currently using OLECMDEXECOPT_DONTPROMPTUSER in order to avoid any
>keyboard intervention.
>
>I am using m_WebBrowser.ExecWB(OLECMDID_SAVE, OLECMDEXECOPT_DONTPROMPTUSER,
>NULL, NULL);
>
>so that the PDF files will be stored, one after another, automatically. I am
>not sure what to put in place of the NULLs. There seems to be no info
>available on this.
>
>Henry
>
>


This is a wild shot in the dark.....

DONTPROMPTUSER, o,o});
 
Back
Top