Creating Google calendar entries (Access 2010) (1 Viewer)

msch-prv

New member
Local time
Yesterday, 19:37
Joined
Feb 20, 2012
Messages
1
Hi,

I am trying to insert Google calendar entries from MS Access 2010. The references I have looked up so far use the Inet (Microsoft Internet Transfer) control, which seems to be part of msinet.ocx. Since msinet.ocx is not shipped with Office Professional 2010 (at least not in my copy), I registerered the missing dll (v 6.0) but cannot go beyond Inet1.Execute (Error: Object does not support this property or method.)

The code, patched up from the resources I looked at, is posted below. Questions:
1. Is this the right approach to create v.3 Google calendar entries?
2. Is msinet.ocx deprecated? I looked at an alternative approach using the "MSXML2.XMLHTTP" object instead of Inet, but this does not work either.

There are plenty of tutorials on Google calendars for .NET but sadly only a few targeting MS Access 2010/VBA. Any help would be greatly appreciated. TIA.

Code:
    Private Sub btnAddEvent_Click()
        ' Define vars
        ...
        
        ' Init account parms
        myEmail = Me.txtEmailAddress
        myPwd = Me.txtPwd
        mySource = "Google event entry example"
        
          ' Check if user account is authenticated
        strURL ="https://www" & ".google.com/accounts/ClientLogin"
        strFormData = "Email=" & myEmail & "&Passwd=" & myPwd & "&source=" & mySource & "&service=cl"
        strHeaders = "Content-Type:application/x-www-form-urlencoded"
        
-->    Inet1.Execute strURL, "POST", strFormData, strHeaders ' !! Creates problems
        
        'Wait for the server response. (The response includes the authentication mode.)
        bolResp = False        
        Do Until bolResp= True
            DoEvents
        Loop
        
        'Ensure that the password is ok.
        If InStr(strResp, "BadAuthentication") Then MsgBox "Authentication error. Try again.", vbCritical, "Error" : Exit Sub
        
        'Extract the authorization code
        strAuthCode = Right(strResp, Len(strResp) - InStrRev(strResp, "Auth=") - 4)
        Debug.print strAuthCode    
        ...
        ...
    End Sub
 

Users who are viewing this thread

Top Bottom