Why not read the Downloads folder from the registry with the correct GUID and mix the result with the user profile path? Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow.
Learn more. Get the Windows Download folder's path Ask Question. Asked 7 years, 7 months ago. Active 5 months ago. Viewed 33k times. I guess it has to be done reading the registry , but I'm clueless about that. Dmitry Pavliv The point of the whole question is that the Downloads folder, like the Documents folder and many others, can be anywhere. Add a comment. Active Oldest Votes. Simple Solution - usually works This is from a comment by assylias.
CreateObject "WScript. RegRead registryKey ' read key from registry End Function. ChrisB ChrisB 2, 5 5 gold badges 27 27 silver badges 53 53 bronze badges. How would I do the same for Mac? Found the answer google a little more JonPeltier I don't even remember this issue but I unaccepted the answer on account of your comment. I wrote this VBA code to do that.
It has been tested in Excel Path For how to run the. Files For Each f In fls Debug. Print f. Name Next End Sub. While this code snippet may solve the question, including an explanation really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion.
Si8 you may want to post a separate question. The OP's question is specifically about Windows. This answer is wrong because the location and name of the user's downloads folder can be anything. The user could have moved it, the user could have renamed it. How could I do it? SpecialFolders doesn't list the Downloads folder. This is from a comment by assylias. As others have mentioned it will provide the wrong folder path if the user has changed the default "Downloads" location - but it's simple.
I didn't know what to do with it so I created the function below. This turns it into a function and returns the actual path. Call it like this: Debug. It won't work in any bit version of Office. I don't know if its Unicode shenanigans will work in versions of Office more recent than It's not pretty. NameSpace 'shell:Downloads'. For how to run the. Why not read the Downloads folder from the registry with the correct GUID and mix the result with the user profile path?
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Get the Windows Download folder's path Ask Question.
Asked 7 years, 2 months ago. Active 17 days ago. Viewed 29k times. I guess it has to be done reading the registry , but I'm clueless about that. Improve this question. Dmitry Pavliv The point of the whole question is that the Downloads folder, like the Documents folder and many others, can be anywhere. Add a comment. Active Oldest Votes. Simple Solution - usually works This is from a comment by assylias.
CreateObject "WScript. RegRead registryKey ' read key from registry End Function. Improve this answer. ChrisB ChrisB 2, 5 5 gold badges 22 22 silver badges 51 51 bronze badges.