Add attendees from excel vba

E

eran

Hello,
I have the following code in Excel VBA to create an appointment in
Outlook calander. I want also to add an optional attendees.

Can anyone help? nothing I do seem to work!

Dim objOL As Object
Dim objItem As Object
Dim lngRow As Long

Set objOL = CreateObject("Outlook.Application")
Set objItem = objOL.CreateItem(1)
If Me.CheckBox_AdvanceParam.Value = True Then GoTo MultiplePM

With objItem
.Body = Me.ComboBox_PMType.Text
.Duration = 360
.ReminderMinutesBeforeStart = (60 * 24)
.Start = Me.TextBox_Date.Text & " 09:30:00 AM"
.Subject = Me.ComboBox_PMType.Text & " on " &
Me.ComboBox_System
.Save
End With

Thanks a lot,
Eran
 
M

Michael Bauer

Am 24 Nov 2005 06:37:28 -0800 schrieb eran:

Eran, use the Recipients.Add function and set the Type property of the
returned Recipient object = olOptional.
 
E

eran

Thanks for you replay.
I found that I can use:

..optionalattendees = "Name"

But now a security worning pops out and alert the user that a program
is trying to send mail on his behalf... Any way to turn it of?
(Application.DisplayAlerts = False will select No by default)

Thanks again,
Eran
 

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