Hi Hans,
Thank you very much.
I tried the above version of code now. But still I got an error. I have recorded my screen. I think it would be helpful you to understand what went wrong.
https://drive.google.com/file/d/0B1yWnl ... sp=sharing" onclick="window.open(this.href);return false;
I think this is my system related configuration or something like that. So, please ignore this if it's too hard to fix by this way :)
Now I just tried to download a file using this method. This will work with Google Chrome browser. So, the file will be download to Chrome download location. (Default is 'Downloads' folder).
Code: Select all
Sub DownloadTest()
Dim chromePath As String
On Error GoTo Error
chromePath = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
Shell (chromePath & " -url https://drive.google.com/uc?export=download&id=0B1yWnlyZ8msETUEwRWMzeG5lclU")
Exit Sub
Error:
chromePath = "C:\Program Files\Google\Chrome\Application\chrome.exe"
Shell (chromePath & " -url https://drive.google.com/uc?export=download&id=0B1yWnlyZ8msETUEwRWMzeG5lclU")
Exit Sub
End Sub
Then I have to move the downloaded file into My Documents folder. But I have no idea about how to wait this macro until complete the file download process.
Code: Select all
Private Sub Move_File()
Name ("C:\Users\" & Environ("UserName") & "\Downloads") & "\Style Checklist.xltm" As CreateObject("WScript.Shell").SpecialFolders("MyDocuments") & "\Style Checklist.xltm"
End Sub
Let me know if you have any better option to do that process via VBA. Thank you!
*Edited