Optional Attendess for a Meeting Request

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
 
K

Ken Slovak - [MVP - Outlook]

To recipients are required, Cc recipients are optional and Bcc recipients
are resources.
 
A

Andy

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top