Access / Outlook "Cannot send this meeting request" (1 Viewer)

tkpstock

Cubicle Warrior
Local time
Yesterday, 19:49
Joined
Feb 25, 2005
Messages
206
I am attempting to create an Outlook meeting on the fly, add a recipient, then send the meeting request. Everything works, but when it goes to send it, I get the usual Bill Gates cryptic error "Cannot send this meeting request".

Anyone have a clue as to why? Here is the code:

Code:
Function AddReminder()
    Dim myOlApp As Outlook.Application
    Dim myItem As Outlook.AppointmentItem
    Dim myRecip As Outlook.Recipient
    Set myOlApp = CreateObject("Outlook.Application")
    Set myItem = myOlApp.CreateItem(olAppointmentItem)
    myItem.MeetingStatus = olMeeting
    myItem.Subject = "My Reminder"
    myItem.Body = "This is the message body"
    myItem.Location = "Arbitrary"
    myItem.Start = #3/10/2005 1:30:00 PM#
    myItem.Duration = 0
    myItem.ReminderSet = True
    myItem.ReminderMinutesBeforeStart = 0
    Set myRecip = myItem.Recipients.Add("Smith, John")
    myRecip.Type = 1
    If myItem.Recipients.ResolveAll Then
        myItem.Save
        myItem.Send
    End If
End Function

If I just save the apointment, it saves just find, but doesn't send it.
 
Last edited:

tkpstock

Cubicle Warrior
Local time
Yesterday, 19:49
Joined
Feb 25, 2005
Messages
206
Figured one thing out, but...

UPDATE: I figured out that it is because the Outlook application isn't open. If it is open, it will send the message fine. If it is not open, it crashes. Is there a way to tell if the Outlook application is open? If not, is there a way to force it open?

Thanks in advance!
 

Users who are viewing this thread

Top Bottom