I've looked all over trying to find out how to send a Meeting Reques
using a template, but have not had any luck. Has anyone come acros
this in their coding?
Current Code below:
Sub SendMessage(Optional AttachmentPath)
On Error Resume Next
' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
' Create the message.
Set oAppointment = Outlook.CreateItem(olAppointmentItem)
With oAppointment
'Set meeting parameters
.Duration = 30 '(in minutes)
.Location = sStation
.MeetingStatus = olMeeting
.Start = dTime
' Set the Subject, Body, and Importance of the message.
'.HTMLBody = CustomerMessage 'does not read HTML
.Subject = sSubject 'or title
.Body = CustomerMessage
.Importance = olImportanceHigh 'High importance
' Resolve each Recipient's name.
.Recipients.Add(sEmail).Type = 1 '1 = Required, 2 = Optional
DisplayMsg = True 'set to send auto = false
If DisplayMsg Then
.Display
Else
'.Save 'if you want a draft copy
.Send '--- Send the message.
End If
End With
'--- Remove the message and Outlook application from memory.
Set oAppointment = Nothing
Set objOutlook = Nothing
End Su
--
Message posted from
http://www.ExcelForum.com