DH
Programmer
- Dec 8, 2000
- 168
What changes would need to be made to the following code snipped to make it late binding so that I do not need to reference the msoutl9.olb in the VBA references?
Here is the code:
Dim oOutlook As Outlook.Application
Dim oAppt As Outlook.AppointmentItem
Set oOutlook = New Outlook.Application
Set oAppt = oOutlook.CreateItem(olAppointmentItem)
With oAppt
.Start = due_date & " " & due_time
.Duration = ApptLength
.Subject = contactname & " - " & Notes
If Not IsNull(Notes) Then .body = Notes
If Not IsNull(ApptLocation) Then
.Location = ApptLocation
End If
If ApptReminder Then
.ReminderMinutesBeforeStart = ApptReminderMinutes
.ReminderSet = True
End If
.Save
End With
' Release Outlook object
Set oOutlook = Nothing
Thank you in advance for any suggestions/examples...
DH
Here is the code:
Dim oOutlook As Outlook.Application
Dim oAppt As Outlook.AppointmentItem
Set oOutlook = New Outlook.Application
Set oAppt = oOutlook.CreateItem(olAppointmentItem)
With oAppt
.Start = due_date & " " & due_time
.Duration = ApptLength
.Subject = contactname & " - " & Notes
If Not IsNull(Notes) Then .body = Notes
If Not IsNull(ApptLocation) Then
.Location = ApptLocation
End If
If ApptReminder Then
.ReminderMinutesBeforeStart = ApptReminderMinutes
.ReminderSet = True
End If
.Save
End With
' Release Outlook object
Set oOutlook = Nothing
Thank you in advance for any suggestions/examples...
DH