Automate adding Outlook Required Attendees with ID number

AChuckle

New Member
Joined
May 6, 2011
Messages
20
Hi-

My macro already creates an outlook invite that adds in employee ID numbers to the invite as required attendees. The IDs are in the format of "A111111". there will always be a letter followed by 6 numbers.

My problem is that once the outlook invite is created and displayed the address book does not look up the ID, change it to the appropriate persons name and then display their availability.

Does anyone know how to get the outlook address book to lookup the IDs after my macro creates the invite? My current code is below.

Dim Sales As String
Dim UW As String
Dim UWLead As String
Dim Medicare As String
Dim Rx As String
Dim DentalGI As String
Dim Director As String

Sales = Sheets("Summary").Range("E42").Value
On Error Resume Next
UW = Sheets("Summary").Range("E43").Value
On Error Resume Next
UWLead = Sheets("Summary").Range("E44").Value
On Error Resume Next
Medicare = Sheets("Summary").Range("E45").Value
On Error Resume Next
Rx = Sheets("Summary").Range("E46").Value
On Error Resume Next
DentalGI = Sheets("Summary").Range("E47").Value
On Error Resume Next
Director = Sheets("Summary").Range("E49").Value
On Error Resume Next

Dim olApp As Outlook.Application
Set olApp = CreateObject("Outlook.Application")

Dim olNs As Outlook.Namespace
Set olNs = olApp.GetNamespace("MAPI")
olNs.Logon

' Create a new appointment
Dim olAppt As Outlook.AppointmentItem
Set olAppt = olApp.CreateItem(olAppointmentItem)

' Set start time as now
olAppt.Start = Now()

With olAppt
.Duration = 30
.Subject = SubjectLine & PsName
.RequiredAttendees = Sales & "; " & UW & "; " & UWLead & "; " & Medicare & "; " & Rx & "; " & DentalGI & "; " & Director
.Body = "The call meeting information is below............"
.Location = "Call-in:......
.ReminderMinutesBeforeStart = 15
.ReminderSet = True
End With

' Display Appointment
olAppt.Display

' Clean up
Set olNs = Nothing
Set olAppt = Nothing
Set olApp = Nothing



Thanks in advance for any help!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,224,532
Messages
6,179,388
Members
452,908
Latest member
MTDelphis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top