Optional Attendess for a Meeting Request

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

I'm generating a meeting request in Outlook 2000 from Access97 using
automation.

I can add attendess to the reuired list, set start, stop, reminders,
attachments and message body.

How do I add attendess to the optional list?

Andy
 
To recipients are required, Cc recipients are optional and Bcc recipients
are resources.
 
Solution found, inspite of several misdirections:

I tried using olAppt.to and olAppt.cc, but recieved runtime errors.

It is the recipient type that determines whether the recipient is Required,
Optional, or a resource. You must first add the recipient (this creates a
new item x in the reipients object, then set it's type value.

I experienced some delay before the item was actually created and accessible
by VBA from Access97. So I added a 'doevents' and the resolve call prior to
setting the type.

The other tricky part is to know which item index to use. Recipients.count
provides the numver of current items (attendees), but again there was a
delay before the attendee was added and accessible. I decided to set the
Optional list first (thus index = 1), and then proceed to add the Required
list of attendees.

If olAppt is a meeting request object:

olappt.recipients.add "Email@somewhere"
docmd.doevents
olappt.resolve
olappt.recipients(1).type=2

olappt.recipients.add strTo


Hope this is helpful to others,
Andy
 
Since Recipients.Add is a function it can return the Recipient you are
adding (Set oRecip = oRecips.Add(etc.). That way you always know which
recipient you just added and don't have to figure out index values.
 
Back
Top