G
Guest
I'm trying to click the button in MS Access to open a window to shedule a
meeting.
But, I can open only the New message window from the Mail.
How could I open the Appointment window from the Calendar?
I'm using the following code:
Private Sub cmdMeeting_Click()
Dim bStarted As Boolean
Dim objOutlook As Object
Dim objMeeting As Object
Set objOutlook = GetObject(, "Outlook.Application")
If Err <> 0 Then
'Outlook wasn't running, start it from code
Set objOutlook = CreateObject("Outlook.Application")
bStarted = True
End If
Set objMeeting = objOutlook.CreateItem(olAppointmentItem)
With objMeeting
.Subject = "The meeting"
End With
objMeeting.Display
On Error Resume Next
If bStarted Then
'If we started Outlook from code, then close it
objOutlook.Quit
End If
Set objMeeting = Nothing
Set objOutlook = Nothing
End Sub
Thanks
meeting.
But, I can open only the New message window from the Mail.
How could I open the Appointment window from the Calendar?
I'm using the following code:
Private Sub cmdMeeting_Click()
Dim bStarted As Boolean
Dim objOutlook As Object
Dim objMeeting As Object
Set objOutlook = GetObject(, "Outlook.Application")
If Err <> 0 Then
'Outlook wasn't running, start it from code
Set objOutlook = CreateObject("Outlook.Application")
bStarted = True
End If
Set objMeeting = objOutlook.CreateItem(olAppointmentItem)
With objMeeting
.Subject = "The meeting"
End With
objMeeting.Display
On Error Resume Next
If bStarted Then
'If we started Outlook from code, then close it
objOutlook.Quit
End If
Set objMeeting = Nothing
Set objOutlook = Nothing
End Sub
Thanks