VBA Code to automatically download a file from Google Drive - vba

Does anyone have an example of VBA code to automatically download a file from Google Drive. I can get to viewing the file in Chrome but then I have to manually select 'Download'. I would like to press a button and then pick the downloaded file from my default 'Download' folder. No in-between intervention.

One option would be to launch the users default web browser with a direct link to download your file from Google Drive, this would prompt the user to Save As / Open your user guide in the same way that it would if they clicked to download a PDF from a website and so might be sufficient.
This question's answer details how to open a url in browser, and you can use this website to create direct download links from Google Drive share links.

Using the 'GetspecialFolder' UDF, you can download files from any cloud drive as simple as:
FileCopy GetSpecialFolder(vbDirGoogleDrive) & "MyFile.DOC", GetSpecialFolder(vbDirDownloads) & "MyFile.DOC"
http://www.EXCELGAARD.dk/Lib/GetSpecialFolder/

Related

Direct link to local kml file

I run an apache webserver on ubuntu 16.04
I am creating many kml files on my server and I want the user to click a link that will automatically open the kml on google maps (and not download it)
e.g. click to open map doesn't open the file, it only downloads it.
If I host the file on google drive and get the shareable link to it, and I use this link everything works great (I can use it as a simple href in a HTML page).
Unfortunately, doing it through google drive is not a feasible option for me (too many files, high update rate).
Is there any other way I can do it with local file?

WebDav Pdf Saving error

I have set up a webdav folder that I can access thorugh chrome and edit files and save them back to the server, for example, I can open a word doc, edit it and save it back.
When I come to open a pdf, it wont save back to the server and downloads a copy of the pdf instead of the original.
Is there a way of enabling this to edit a pdf?
My end goal is to be able to open a pdf, add comments/highlights and save it back to the server, through my browser.
Thank you
Edit:
I have set this up through Apache 2.4, no plug ins through chrome, I have mapped a network drive to the server folder where I can open and edit files. Except PDFs, I would like to add comments to a off but when I open one the option is greyed out and when I try and save it after opening it tries to save to my desktop.
I'm not sure i've got your use case right, but if i've understood you correctly you have a link in a web page to a PDF which you're viewing in chrome. You click on that link and the PDF downloads to a temp file from which it is opened. If you edit and save those changes are simply saved to the temp file on your local PC. Is that correct?
If so, then this is simply normal behaviour for links in web pages. There is absolutely nothing in the HTML standard which suggests links should be opened by an editor with knowledge of the source location.
What you really want is for the link to launch an editor program which retrieves the remote document in edit mode (probably locking the remote resource) and then have edits saved back to the server. For this to happen there generally needs to be some special interaction in the browser. In Internet Explorer this is provided by the sharepoint dll and special script code. I think there's a plugin for Chrome which does the same thing, although differently.
I havent used the Chrome plugin, but i think this might help - https://code.google.com/p/npapi-msdocs/

Permanent link to an audio file (googleDrive)

I'm developing a player for playing audio from the "cloud." Having question, if it is possible to obtain permanent link to an audio file to play without regular re-authorization (googleDrive)?
When you get the file list back from Google drive theres a field called AlternateLink this apears to have a link something like this:
https://docs.google.com/file/d/{SomehashStuff}/edit?usp=drivesdk
If I dump that link into a browser it opens the file for me. Now this will probably only work if you have access to that file and are loged into google at the time. So if you save that link my bet is that you will be able to use it later to open the file. But this will probably only work if you have access to the file and are loged into google with the browser you are using to open the link.

download pdf file in blackberry in my applicaiton?

I am working on a sample BB application for downloading task.
I have internet connection setting in my app. Now my task "on click of a button, i want to download a PDF file in my device as a normal file download from a link"
I have searched alot regarding this query but didn't get anything.
As the code very long to provide here, please take a look at this url and invoke the blackberry browser with your pdf url.

External access to file shelf

I am testing a Google Chrome notebook. Whenever I download a file it goes to a folder called "File shelf" which is somehow connected to my Gmail account. Is it possible to access this folder on a "normal" system running any browser? I did not find how to do it yet. In general, is there a description on how to manage this folder: delete, copy to external storage (USB), etc?
The 'File shelf' is not connected to your Gmail. It's a place on the SSD. If you click 'Ctrl-M' you will get a folder with all the files on your local SSD.
Once you are in the folder - right click will give you the options to delete/rename each file.
If you want wish to do more with this new File API - here is a post I've wrote on it.
Good luck.