Link to home
Start Free TrialLog in
Avatar of Kevin Rea
Kevin ReaFlag for United States of America

asked on

VBA code to add calendar entry to Google calendar

Anyone have some existing VBA code I could use in Microsoft Access 2016 to add a new calendar event to Google calendar?
I have looked all over the web already, and I have not found any.
Thanks for your help.
Kevin Rea
Lancaster, California
Avatar of John Tsioumpris
John Tsioumpris
Flag of Greece image

Well i also took a look around and it seems that its not that straightforward....the Google authentication procedure makes it quite hard to implement it in VBA and given the fact that codes i found are quite old they have a great chance of being obsolete/useless..
Anyway there is some light in the tunnel :
The 1st option...i read it somewhere...is to have it semiautomatic...prepare a .csv (from Access the automatic part) with all your scheduling for a time period and just import it to Google Calendar (Settings Menu -->Settings -->Import/Export)
The 2nd option ..is a paid one...ChilKat.. has an activeX that does this for you all the way automatic ...the code example is here : https://www.example-code.com/vb6/google_calendar_insert_event.asp but because i don't have any sort of experience in using it i reckon it would be wise to contact them to ensure that this work under Access ..thankfully they i have trial...
You can do this.   Like John, I looked at the API, and it is callable from VBA with this:

https://github.com/VBA-tools/VBA-Web

 which has oAuth2 support.  However I don't have existing code.  This is something we'd have to develop.

 Maybe someone else will jump in, but if you want to take a stab at it, we can walk through it.

Jim.
VBA-Web it was the 1st thing i found but there were some mentions in Internet that it has some issues...i didn't look any further as i didn't found a successful implementation...
Well I'm about to find out because I plan on using that with a project I'll be working on here shortly in the next few weeks.

 But I haven't heard/seen any downside comments on it, and the oAuth stuff has been in there for three years now.

Jim.
Well ...go for it... :) .. and let us know...it would be interesting
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.