PC Review


Reply
Thread Tools Rate Thread

Sending and deleting meeting invitation via Outlook

 
 
=?Utf-8?B?ZGJvcm50?=
Guest
Posts: n/a
 
      20th Feb 2007
I was able to create meeting and send out invitations for them via Access,
but for some reason when the invitee responds it gave me a message saying the
meeting is not on the calendar and that it might've been deleted. On my
calendar it also shows that no one had responded to the meeting. I'm
thinking that I'm missing some kind of argument to link the actual meeting
and the invitation? Any ideas?
Here's the code that I use:

Set olApp = CreateObject("Outlook.Application")
Set olNS = olApp.GetNamespace("MAPI")
Set olfolder = olNS.GetDefaultFolder(olFolderInbox)
Set olApptItem = olfolder.Items.Add("IPM.Appointment")


strBodyText = "This is a test please accept the invitation"

'strSubject = "Review Submission ID " & _
' [SubmissionID] & " Due on " & [Due Date]

With olApptItem
.MeetingStatus = olMeeting
.Recipients.Add ("Smith, John ")
.Subject = strSubject
.Start = [Response Due Date]
.Body = strBodyText
.AllDayEvent = True
.ReminderSet = True
.ReminderMinutesBeforeStart = 10080 '1 day reminder = 1440, 1 week = 10080
.Save
.Send
End With

 
Reply With Quote
 
 
 
 
GeoffG
Guest
Posts: n/a
 
      22nd Feb 2007
Try changing "Inbox" to "Outbox" on the following code line:

'Set olFolder = olns.GetDefaultFolder(olFolderInbox)
Set olFolder = olns.GetDefaultFolder(olFolderOutbox)

Does that then put the appointment into your Outlook calendar when you send?

Geoff


"dbornt" <(E-Mail Removed)> wrote in message
news:302BDFEA-2D11-468D-8611-(E-Mail Removed)...
>I was able to create meeting and send out invitations for them via Access,
> but for some reason when the invitee responds it gave me a message saying
> the
> meeting is not on the calendar and that it might've been deleted. On my
> calendar it also shows that no one had responded to the meeting. I'm
> thinking that I'm missing some kind of argument to link the actual meeting
> and the invitation? Any ideas?
> Here's the code that I use:
>
> Set olApp = CreateObject("Outlook.Application")
> Set olNS = olApp.GetNamespace("MAPI")
> Set olfolder = olNS.GetDefaultFolder(olFolderInbox)
> Set olApptItem = olfolder.Items.Add("IPM.Appointment")
>
>
> strBodyText = "This is a test please accept the invitation"
>
> 'strSubject = "Review Submission ID " & _
> ' [SubmissionID] & " Due on " & [Due Date]
>
> With olApptItem
> .MeetingStatus = olMeeting
> .Recipients.Add ("Smith, John ")
> .Subject = strSubject
> .Start = [Response Due Date]
> .Body = strBodyText
> .AllDayEvent = True
> .ReminderSet = True
> .ReminderMinutesBeforeStart = 10080 '1 day reminder = 1440, 1 week =
> 10080
> .Save
> .Send
> End With
>



 
Reply With Quote
 
=?Utf-8?B?ZGJvcm50?=
Guest
Posts: n/a
 
      22nd Feb 2007
Hi Geoff,
Thanks for the reply. I changed to to olFolderCalendar and so that part
is working, now I just need to find out how to delete the meeting and send
out meeting cancelation notices. I was able to delete the meeting, but no
notice gets sent out, so everybody else still thinks the meeting is on.
Here's my code:

Set olApp = CreateObject("Outlook.Application")
Set olNS = olApp.GetNamespace("MAPI")
Set olfolder = olNS.GetDefaultFolder(olFolderCalendar)
Set olApptItems = olNS.GetDefaultFolder _
(olFolderCalendar).Items

strSearch = "Test Meeting"
MsgBox olApptItems.Find("[Subject] = """ & strSearch & """")

Set olCurrAppt = olApptItems.Find("[Subject] = """ & strSearch & """")
FindAppt:
While TypeName(olCurrAppt) <> "Nothing"
olCurrAppt.MeetingStatus = olMeetingCanceled ' cancels the meeting
olCurrAppt.Send ' sends an updated notice, but doesn't say meeting
canceled
olCurrAppt.Delete
Set olCurrAppt = olApptItems.FindNext
Wend
Set olApptItems = Nothing
Set olCurrAppt = Nothing
Set olfolder = Nothing
Set olNS = Nothing
Set olApp = Nothing


"GeoffG" wrote:

> Try changing "Inbox" to "Outbox" on the following code line:
>
> 'Set olFolder = olns.GetDefaultFolder(olFolderInbox)
> Set olFolder = olns.GetDefaultFolder(olFolderOutbox)
>
> Does that then put the appointment into your Outlook calendar when you send?
>
> Geoff
>
>
> "dbornt" <(E-Mail Removed)> wrote in message
> news:302BDFEA-2D11-468D-8611-(E-Mail Removed)...
> >I was able to create meeting and send out invitations for them via Access,
> > but for some reason when the invitee responds it gave me a message saying
> > the
> > meeting is not on the calendar and that it might've been deleted. On my
> > calendar it also shows that no one had responded to the meeting. I'm
> > thinking that I'm missing some kind of argument to link the actual meeting
> > and the invitation? Any ideas?
> > Here's the code that I use:
> >
> > Set olApp = CreateObject("Outlook.Application")
> > Set olNS = olApp.GetNamespace("MAPI")
> > Set olfolder = olNS.GetDefaultFolder(olFolderInbox)
> > Set olApptItem = olfolder.Items.Add("IPM.Appointment")
> >
> >
> > strBodyText = "This is a test please accept the invitation"
> >
> > strSubject = "Test Meeting"
> >
> > With olApptItem
> > .MeetingStatus = olMeeting
> > .Recipients.Add ("Smith, John ")
> > .Subject = strSubject
> > .Start = [Response Due Date]
> > .Body = strBodyText
> > .AllDayEvent = True
> > .ReminderSet = True
> > .ReminderMinutesBeforeStart = 10080 '1 day reminder = 1440, 1 week =
> > 10080
> > .Save
> > .Send
> > End With
> >

>
>
>

 
Reply With Quote
 
GeoffG
Guest
Posts: n/a
 
      23rd Feb 2007
I thought it might be the Calendar folder - but suggested the Outbox because
of the use of "Send".

As to your follow-up question, you'll get an authoritative answer if you
post to an Outlook newsgroup or to www.outlook.com. (especially if you get
an answer from Sue Mosher or Ken Slovak). I noticed a similar question on
Sue's website (www.outlook.com) from a guy who said that, when he sent
meeting cancellations programmatically, they don't look the same when
they're received as when they're sent from the user-interface. Given that,
when you delete a MeetingItem at the user-interface, you get options like
"send cancellation and delete meeting", I would have thought that the Delete
method for an AppointmentItem associated with a MeetingItem would have had
arguments that would have allowed for the various Delete/Send choices. But I
can't find that they do. However, I don't know the Outlook object model that
well.

If you get a result, please post back here. I'd be interested to know.

Geoff



"dbornt" <(E-Mail Removed)> wrote in message
news:1EA3D90C-C6C2-4BC1-BCC9-(E-Mail Removed)...
> Hi Geoff,
> Thanks for the reply. I changed to to olFolderCalendar and so that part
> is working, now I just need to find out how to delete the meeting and send
> out meeting cancelation notices. I was able to delete the meeting, but no
> notice gets sent out, so everybody else still thinks the meeting is on.
> Here's my code:
>
> Set olApp = CreateObject("Outlook.Application")
> Set olNS = olApp.GetNamespace("MAPI")
> Set olfolder = olNS.GetDefaultFolder(olFolderCalendar)
> Set olApptItems = olNS.GetDefaultFolder _
> (olFolderCalendar).Items
>
> strSearch = "Test Meeting"
> MsgBox olApptItems.Find("[Subject] = """ & strSearch & """")
>
> Set olCurrAppt = olApptItems.Find("[Subject] = """ & strSearch & """")
> FindAppt:
> While TypeName(olCurrAppt) <> "Nothing"
> olCurrAppt.MeetingStatus = olMeetingCanceled ' cancels the meeting
> olCurrAppt.Send ' sends an updated notice, but doesn't say meeting
> canceled
> olCurrAppt.Delete
> Set olCurrAppt = olApptItems.FindNext
> Wend
> Set olApptItems = Nothing
> Set olCurrAppt = Nothing
> Set olfolder = Nothing
> Set olNS = Nothing
> Set olApp = Nothing
>
>
> "GeoffG" wrote:
>
>> Try changing "Inbox" to "Outbox" on the following code line:
>>
>> 'Set olFolder = olns.GetDefaultFolder(olFolderInbox)
>> Set olFolder = olns.GetDefaultFolder(olFolderOutbox)
>>
>> Does that then put the appointment into your Outlook calendar when you
>> send?
>>
>> Geoff
>>
>>
>> "dbornt" <(E-Mail Removed)> wrote in message
>> news:302BDFEA-2D11-468D-8611-(E-Mail Removed)...
>> >I was able to create meeting and send out invitations for them via
>> >Access,
>> > but for some reason when the invitee responds it gave me a message
>> > saying
>> > the
>> > meeting is not on the calendar and that it might've been deleted. On
>> > my
>> > calendar it also shows that no one had responded to the meeting. I'm
>> > thinking that I'm missing some kind of argument to link the actual
>> > meeting
>> > and the invitation? Any ideas?
>> > Here's the code that I use:
>> >
>> > Set olApp = CreateObject("Outlook.Application")
>> > Set olNS = olApp.GetNamespace("MAPI")
>> > Set olfolder = olNS.GetDefaultFolder(olFolderInbox)
>> > Set olApptItem = olfolder.Items.Add("IPM.Appointment")
>> >
>> >
>> > strBodyText = "This is a test please accept the invitation"
>> >
>> > strSubject = "Test Meeting"
>> >
>> > With olApptItem
>> > .MeetingStatus = olMeeting
>> > .Recipients.Add ("Smith, John ")
>> > .Subject = strSubject
>> > .Start = [Response Due Date]
>> > .Body = strBodyText
>> > .AllDayEvent = True
>> > .ReminderSet = True
>> > .ReminderMinutesBeforeStart = 10080 '1 day reminder = 1440, 1 week =
>> > 10080
>> > .Save
>> > .Send
>> > End With
>> >

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending a Meeting Invitation Update kevin.ingle@americredit.com Microsoft Outlook VBA Programming 10 16th Jan 2008 04:28 PM
How to schedule a meeting without sending an invitation =?Utf-8?B?TWlrZTI0NjAx?= Microsoft Outlook Calendar 6 15th Dec 2007 12:44 AM
Meeting Invitation Keeps Deleting and Filling up my Delete Box =?Utf-8?B?bXBmYW5uZW4=?= Microsoft Outlook Calendar 0 25th Oct 2006 08:47 PM
Outlook Exchange keeps sending a meeting invitation from long ago =?Utf-8?B?VG9tIEhpbGxlYXJ5?= Microsoft Outlook Calendar 0 22nd Feb 2006 09:19 PM
Sending a meeting invitation to 120 people. =?Utf-8?B?Q29ubmll?= Microsoft Outlook Discussion 0 17th Aug 2005 06:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:42 PM.