C
Cheryl Fischer
Here is a bit of sample code to get you started. It presumes that you'll
be running it from a command button on a form. Note that you will need to
set a reference to the Microsoft Outlook xx.x Object Library (where xx.x is
the Outlook version you are using).
Dim objOApp As New Outlook.Application
Dim objAppt As AppointmentItem
Dim oExp As Outlook.Explorer
Set objOApp = New Outlook.Application
Set objAppt = objOApp.CreateItem(olAppointmentItem)
Set oExp = objOApp.Session.GetDefaultFolder(olFolderInbox).GetExplorer
With objAppt
.RequiredAttendees = "Addressee(s) Name(s)"
.Subject = "Subject of Meeting/Appointment"
.Importance = 2 ' high
.Start = YourDateField & " " & IIf(IsNull(YourTimeField), " 8:00",
YourTimeField)
.Location = "Location of Meeting"
.Body = "Additional information to appear in body"
.MeetingStatus = 1
.ResponseRequested = True
'.Save 'Uncomment if you want message saved to your sent items
folder
.Send
MsgBox "Item sent."
End With
Exit_btnSendItem_Click:
Set objOApp = Nothing
Set objAppt = Nothing
Set oExp = Nothing
Exit Sub
I got a lot of it from "Outlook 2000 VBA" by Dwayne Gifford (Wrox Pub.)
For additional information, browse the excellent website:
http://www.slipstick.com
be running it from a command button on a form. Note that you will need to
set a reference to the Microsoft Outlook xx.x Object Library (where xx.x is
the Outlook version you are using).
Dim objOApp As New Outlook.Application
Dim objAppt As AppointmentItem
Dim oExp As Outlook.Explorer
Set objOApp = New Outlook.Application
Set objAppt = objOApp.CreateItem(olAppointmentItem)
Set oExp = objOApp.Session.GetDefaultFolder(olFolderInbox).GetExplorer
With objAppt
.RequiredAttendees = "Addressee(s) Name(s)"
.Subject = "Subject of Meeting/Appointment"
.Importance = 2 ' high
.Start = YourDateField & " " & IIf(IsNull(YourTimeField), " 8:00",
YourTimeField)
.Location = "Location of Meeting"
.Body = "Additional information to appear in body"
.MeetingStatus = 1
.ResponseRequested = True
'.Save 'Uncomment if you want message saved to your sent items
folder
.Send
MsgBox "Item sent."
End With
Exit_btnSendItem_Click:
Set objOApp = Nothing
Set objAppt = Nothing
Set oExp = Nothing
Exit Sub
I got a lot of it from "Outlook 2000 VBA" by Dwayne Gifford (Wrox Pub.)
For additional information, browse the excellent website:
http://www.slipstick.com