Download pdf to folder vba - sorry
VBA: Download PDF from URL
Andrew Poulsom said:
....
The file will be saved in the current folder.Click to expand...
Thank you tonnes for this! It's a really quick approach compared to opening the hyperlink and saving that as xxx.
However, one question/problem I have is where does this downloaded file save to? You mentioned "current folder" - what is that? As it seems to be randomly saving this to odd folders (main ones on my desktop, but no idea where without searching for filename in c drive).
Is there a way to save to a particular location - e.g. say I have a folder name, can I save it there? If so, what amendments do I need to make to the above code?
(Right now I have 100 or so hyperlinks to http pdfs in excel spreadsheet column A, folder names for each link in Column B and filenames for these to be saved as in Column C....my plan is to save them to a particular location, and get a looping mechanism working - I think I should be able to amend the above code for the loop to work at least - e.g. by setting the strPDFLink and strPDFFile to point to cell values rather than hardcode and use offset function)
Any help you/anyone can provide, I would be most grateful
Источник: https://www.mrexcel.com/board/threads/vba-download-pdf-from-url.740193/
-
-