


What you would need to do is create a windows form project and add references to Microsoft access core dll and download the nugget package for google drive api from nugget. NET I can provide you with the necessary code to get you started, vb.net is very similar to VBA. This thread might be dead now but if you are working with forms in your database and the user needs to be attaching the files to a particular record displayed in a form with a unique identification number then this is definitely possible but you would have to do it in an external application written in. If anyone has done something similar or can offer any advice, I would be grateful to hear from you. I don't have experience with any coding other than VBA (self taught) so am struggling to understand what the next step should be. Somewhere else it was mentioned that a 'COM wrapper' may be suitable. It was suggested that the IE library could be utilised to log into the Google Drive and the API calls made from the above to upload. Return arg.ProcessUserAuthorization(authCode, state) ' Retrieve the access token by using the authorization code:

' Request authorization from the user (by opening a browser window):ĭim authCode As String = Console.ReadLine() State.Callback = New Uri(NativeApplicationClient.OutOfBandCallbackUrl)ĭim authUri As Uri = arg.RequestUserAuthorization(state) '' Register the authenticator and create the serviceĭim provider = New NativeApplicationClient(GoogleAuthenticationServer.Description, CLIENT_ID, CLIENT_SECRET)ĭim auth = New OAuth2Authenticator(Of NativeApplicationClient)(provider, GetAuthorization)ĭim service = New DriveService(New BaseClientService.Initializer() With ) Imports 2.DotNetOpenAuthĭim CLIENT_ID As = "YOUR_CLIENT_ID"ĭim CLIENT_SECRET As = "YOUR_CLIENT_SECRET" I came across this code for vb.net on another site. If the user is logged into their own Gmail account, that will probably be another issue.

Lots of problems with this though, the main one being that Google Drive does not support VBA. Save as dialog box appears and user selects fileĭatabase logs into its Google Drive and uploads selected file All the users will need the ability to upload to the database/GD so my intention is to have a separate Google account for the database - with its own login details. My intention is to store the documents on Google Drive and have a link on the database for users to retrieve the documents.Īs there are many users spread through different cities, it is not practical to require them to have synced Google Drive folders. I have an MS Access database which now requires me to 'attach' documents to it.
