Interface between Access 365 with Calendar in 365 Business

JohnPapa

Registered User.
Local time
Today, 10:11
Joined
Aug 15, 2010
Messages
1,076
Was wondering whether Access 365 installed on a pc can update the calendar of 365 Business, which apparently is stored on the cloud?

If this is possible, then the next requirement would be to update a specific calendar belonging to a specific user.
 
Have you looked to see if you can use API instead?
 
I use something like the following to output to the default calendar

Code:
Public Function funOutputAppointmentToOutlook(dtmDate As Date, strSubject As String)

Dim olApp As Object
Dim mNameSpace As Object
 
Const olFolderCalendar = 9
Const olAppointmentItem = 1
On Error Resume Next
Set olApp = GetObject(, "Outlook.Application")
 
If Err.Number = 429 Then
     Err.Clear
      'Outlook is not running; open Outlook with CreateObject
      Set olApp = CreateObject("Outlook.Application")
End If
 
Set mNameSpace = olApp.GetNamespace("MAPI")
'mNameSpace.GetDefaultFolder(olFolderCalendar).display
 
Dim olApt As Object
Set olApt = olApp.CreateItem(olAppointmentItem)

' Add the Form data to the Appointment Properties
With olApt
' If There is no Start Date or Time on
' the Form use Nz to avoid an error

' Set the Start Property Value
.Start = dtmDate '#1/15/2011 4:13:12 PM#        'Nz(Me.Event_date, "") & " " & Nz(Me.Event_time, "")

.duration = 1             'Nz(180, 0)

.Subject = strSubject    'Nz(Me.Venue, "vbnullstring") & " suite " & Nz(Me.Suite, vbNullString) & " REF " & Nz(Me.Reference, vbNullString) & " " & Nz(Me.Bride, vbNullString)

 CreateObject("Outlook.Application").GetNamespace("MAPI").GetDefaultFolder(9).Items(strSubject).Delete

' Save the Appointment Item Properties
.Save

End With

Set olApt = Nothing
Set mNameSpace = Nothing
Set olApp = Nothing
End Function
 
I use something like the following to output to the default calendar

Code:
Public Function funOutputAppointmentToOutlook(dtmDate As Date, strSubject As String)

Dim olApp As Object
Dim mNameSpace As Object
 
Const olFolderCalendar = 9
Const olAppointmentItem = 1
On Error Resume Next
Set olApp = GetObject(, "Outlook.Application")
 
If Err.Number = 429 Then
     Err.Clear
      'Outlook is not running; open Outlook with CreateObject
      Set olApp = CreateObject("Outlook.Application")
End If
 
Set mNameSpace = olApp.GetNamespace("MAPI")
'mNameSpace.GetDefaultFolder(olFolderCalendar).display
 
Dim olApt As Object
Set olApt = olApp.CreateItem(olAppointmentItem)

' Add the Form data to the Appointment Properties
With olApt
' If There is no Start Date or Time on
' the Form use Nz to avoid an error

' Set the Start Property Value
.Start = dtmDate '#1/15/2011 4:13:12 PM#        'Nz(Me.Event_date, "") & " " & Nz(Me.Event_time, "")

.duration = 1             'Nz(180, 0)

.Subject = strSubject    'Nz(Me.Venue, "vbnullstring") & " suite " & Nz(Me.Suite, vbNullString) & " REF " & Nz(Me.Reference, vbNullString) & " " & Nz(Me.Bride, vbNullString)

 CreateObject("Outlook.Application").GetNamespace("MAPI").GetDefaultFolder(9).Items(strSubject).Delete

' Save the Appointment Item Properties
.Save

End With

Set olApt = Nothing
Set mNameSpace = Nothing
Set olApp = Nothing
End Function
Yes, that would be one other way to do it. In other words, to answer your original question, you cannot connect Access to M365, but you can connect Outlook to M365 and then connect Access to Outlook.
 
I was trying to help a friend with a very old version of outlook 2003 and an error message came up saying he could download Outlook for free?

Anyone know if this is the New Outlook?
It would not matter to him as he does no VBA programming. Or should I just read it as exactly that New ? :)
 
The new Outlook for Windows is a best-in-class email experience that’s free for anyone with Windows.

Anyone know if this is the New Outlook?

Given that quote from the first sentence of the first complete paragraph in the article, I would hazard a guess that it IS the New Outlook.
 
Yes, that would be one other way to do it. In other words, to answer your original question, you cannot connect Access to M365, but you can connect Outlook to M365 and then connect Access to Outlook.
Let's do a restart. The client is using 365 Business where he has access of the calendar on the Cloud. In this 365 Business he has 5 users with their own emails. I can output from my A365 DB to the local calendar, which I am guessing is synced with the Cloud data, BUT I want to be able to write to specific calendars, in this case any of the calendars of the 5 users.
 
Last edited:
The last time I tried anything at all like this, it was "old" Outlook. I had to have the users in question grant me rights to their mail with an "invite" operation. After that, it wasn't so bad.


This article claims to be for O365, so maybe it will be helpful.
There is no problem in granting permissions. Do you know the command that I would use to write to specific calendar, instead of the default calendar?
 
Yes, that would be one other way to do it. In other words, to answer your original question, you cannot connect Access to M365, but you can connect Outlook to M365 and then connect Access to Outlook.
You say that I cannot directly connect Access to M365, but I can connect Access to local Outlook, which can be synced (automatically) to M365, so the user can view the appointments over the Web? I am not sure about the way the appointments make their way to the cloud.
 
There is no problem in granting permissions. Do you know the command that I would use to write to specific calendar, instead of the default calendar?

I always did that by hand, by searching the calendars I could write to, using the manual interface. I suppose it would be at the point where you select the calendar and, for the case of multiple calendar rights, you would have a collection of calendars and would have to pick one. I cannot tell you details beyond that point.
 
There is no problem in granting permissions. Do you know the command that I would use to write to specific calendar, instead of the default calendar?
I do not, but I know where I would start looking.

Could even search here on this site?
 
You say that I cannot directly connect Access to M365, but I can connect Access to local Outlook, which can be synced (automatically) to M365, so the user can view the appointments over the Web? I am not sure about the way the appointments make their way to the cloud.
Yes, if Outlook is set to sync to the cloud, then Outlook will take care of moving/copying the calendar event from your local machine to the cloud server.
 
The situation is as follows: On my local Outlook I have a pst-based Outlook and another Outlook which syncs with Exchange. When I use the following code from withing Access 365 the Ace DB appointments get copied to the Exchange based Outlook. Any ideas on how to identify all Outlooks and update all Outlooks. I se Late Binding

Code:
Public Function funOutputAppointmentToOutlook(dtmDate As Date, strSubject As String)

Dim olApp As Object
Dim mNameSpace As Object
 
Const olFolderCalendar = 9
Const olAppointmentItem = 1
On Error Resume Next
Set olApp = GetObject(, "Outlook.Application")
 
If Err.Number = 429 Then
     Err.Clear
      'Outlook is not running; open Outlook with CreateObject
      Set olApp = CreateObject("Outlook.Application")
End If
 
Set mNameSpace = olApp.GetNamespace("MAPI")
'mNameSpace.GetDefaultFolder(olFolderCalendar).display

  Dim objOwner As Object
  Set objOwner = mNameSpace.CreateRecipient("Outlook")

Dim olApt As Object
Set olApt = olApp.CreateItem(olAppointmentItem)

' Add the Form data to the Appointment Properties
With olApt
' If There is no Start Date or Time on
' the Form use Nz to avoid an error

' Set the Start Property Value
.Start = dtmDate '#1/15/2011 4:13:12 PM#        'Nz(Me.Event_date, "") & " " & Nz(Me.Event_time, "")

.duration = 1             'Nz(180, 0)

' vbNullString uses a little less memory than ""
.Subject = strSubject    'Nz(Me.Venue, "vbnullstring") & " suite " & Nz(Me.Suite, vbNullString) & " REF " & Nz(Me.Reference, vbNullString) & " " & Nz(Me.Bride, vbNullString)

'.Body = ""   'Nz(Me.Chair_covers, vbNullString) & " " & Nz(Me.Description, vbNullString) & " --------(table linen)-------- " & Nz(Me.Description_2, vbNullString) & " --------- Additional Items ----------- " & Nz(Me.Description3, vbNullString) & " other info " & Nz(Me.Other_inf, vbNullString) & " address " & Nz(Me.Address_line1, vbNullString) & " " & Nz(Me.Address_line2, vbNullString) & " " & Nz(Me.Town, vbNullString) & " " & Nz(Me.Postcode, vbNullString) & " tel nos " & Nz(Me.Tel_no, vbNullString) & " " & Nz(Me.Alt_tel_no, vbNullString)
'.Location = ""   'Nz(Me.Venue, vbNullString) & " " & Nz(Me.Suite, vbNullString)

'FROM http://www.snb-vba.eu/VBA_Outlook_external_en.html
 CreateObject("Outlook.Application").GetNamespace("MAPI").GetDefaultFolder(9).Items(strSubject).Delete

' Save the Appointment Item Properties
.Save

End With

'olApt.display
 
Set olApt = Nothing
Set mNameSpace = Nothing
Set olApp = Nothing
End Function
 
On my local Outlook I have a pst-based Outlook and another Outlook which syncs with Exchange.
Are you saying you have two separate versions of Outlook installed? Or, were you actually referring to multiple Profiles or Accounts in one Outlook app?
 

Users who are viewing this thread

Back
Top Bottom