Code Comments
Programming Forum and web based access to our favorite programming groups.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.
Post Follow-up to this messageIt 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. >
Post Follow-up to this messageI 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.
Post Follow-up to this messageNot 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.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.