Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Catching a New Window
I am navigating to a URL using the ShDocVw.InternetExplorer.Navigate
method.  This URL points to either a PDF, an Excel spreadsheet, a Word
document, a Powerpoint presentation, or a text file.  When the
"document" is found, InternetExplorer opens up a new window with
whatever application handles the particular file (i.e. Acrobat, Excel,
Word, etc.)  I would like to catch that window so that I can
programmatically save the file.  Can anyone point me in the right
direction?  Thank you.


Report this thread to moderator Post Follow-up to this message
Old Post
michael.blaustein@gmail.com
02-23-06 11:55 PM


Re: Catching a New Window
It seems as though someone else asked that
recently, but I don't remember where it was
or what the upshot was. It seems like it would
make more sense to just download the file.
You're not loading it. You're downloading it.
So there's really no reason to send IE after it.
(You can download directly using Winsock
or you can use the IE package through, I think,
urlmon.dll. I think that Randy Birch has samples
of the latter at his site.)

> I am navigating to a URL using the ShDocVw.InternetExplorer.Navigate
> method.  This URL points to either a PDF, an Excel spreadsheet, a Word
> document, a Powerpoint presentation, or a text file.  When the
> "document" is found, InternetExplorer opens up a new window with
> whatever application handles the particular file (i.e. Acrobat, Excel,
> Word, etc.)  I would like to catch that window so that I can
> programmatically save the file.  Can anyone point me in the right
> direction?  Thank you.
>



Report this thread to moderator Post Follow-up to this message
Old Post
mayayana
02-23-06 11:55 PM


Re: Catching a New Window
I will look into the Winsock and urlmon.dll solutions you suggest, but
I suspect there may be some trouble with that approach.  Here is the
reason why.  The URL I am navigating to isn't to the actual document,
it looks something like this:
https://services.company.com/servle...mentId=47788901

So, there is some POST(?) data there?  (I'm not sure if that is what
you call the stuff after the ?)  Does anyone forsee any problems I
might run into trying to download it directly.  Thanks again.


Report this thread to moderator Post Follow-up to this message
Old Post
michael.blaustein@gmail.com
02-23-06 11:55 PM


Re: Catching a New Window
Not sure if this is what you're looking for, but I've used this before to ge
t a handle on a Word doc that was open in an IE browser:

    Dim browser As SHDocVw.InternetExplorer
    Dim wordDoc As Word.Document

    Set browser = New SHDocVw.InternetExplorer
    browser.Navigate "<URL to a Word doc goes here>"
    Set wordDoc = browser.Document.Application.Documents(1)

Hope this helps,
proto

quote:
Originally posted by michael.blaustein@gmail.com I am navigating to a URL using the ShDocVw.InternetExplorer.Navigate method. This URL points to either a PDF, an Excel spreadsheet, a Word document, a Powerpoint presentation, or a text file. When the "document" is found, InternetExplorer opens up a new window with whatever application handles the particular file (i.e. Acrobat, Excel, Word, etc.) I would like to catch that window so that I can programmatically save the file. Can anyone point me in the right direction? Thank you.

Report this thread to moderator Post Follow-up to this message
Old Post
proto
04-26-08 01:46 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 08:34 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.