I have code that I can use to send an Notes Meeting Invite from VBA, the only problem is that I get a message box generated in Notes "Do You Want to Send the Meeting Invitations to the Appropriate Users?". I don't want that box to pop up, I just want it to go ahead and send the invites without prompting. I'm sure this is simple, but I'm a novice. Thanks in advance for you help. The code is below:
Public Sub SendNotesInvitation(UserName As String, Subject As String, Body As String, AppDate As Date, Duration As Integer)
'Set up the objects required for Automation into lotus notes
Dim Maildb As Object 'The mail database
Dim MailDbName As String
Dim CalenDoc As Object 'The calendar entry itself
Dim workspace As Object
Set workspace = CreateObject("Notes.NOTESUIWORKSPACE"
MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))
'MsgBox MailDbName
MailDbName = "mail\" & Left$(MailDbName, 8) & ".nsf"
'Create a new calender appointment based on template and set the attributes.
Set CalenDoc = workspace.COMPOSEDOCUMENT("SERVERNAME", MailDbName, "Appointment"
CalenDoc.FIELDSETTEXT "AppointmentType", "3"
CalenDoc.FIELDSETTEXT "StartDate", CStr(Format(AppDate, "mm/dd/yy")
CalenDoc.FIELDSETTEXT "EndDate", CStr(Format(AppDate, "mm/dd/yy")
CalenDoc.FIELDSETTEXT "Subject", Subject
CalenDoc.FIELDSETTEXT "Body", Body
CalenDoc.FIELDSETTEXT "SendTo", "EMAILADDRESS"
CalenDoc.Send True, "EMAILADDRESS"
CalenDoc.Save False, False, False
'CalenDoc.SaveMessageOnSend True
CalenDoc.Close
Set Maildb = Nothing
Set CalenDoc = Nothing
Set workspace = Nothing
End Sub
Public Sub SendNotesInvitation(UserName As String, Subject As String, Body As String, AppDate As Date, Duration As Integer)
'Set up the objects required for Automation into lotus notes
Dim Maildb As Object 'The mail database
Dim MailDbName As String
Dim CalenDoc As Object 'The calendar entry itself
Dim workspace As Object
Set workspace = CreateObject("Notes.NOTESUIWORKSPACE"
MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))
'MsgBox MailDbName
MailDbName = "mail\" & Left$(MailDbName, 8) & ".nsf"
'Create a new calender appointment based on template and set the attributes.
Set CalenDoc = workspace.COMPOSEDOCUMENT("SERVERNAME", MailDbName, "Appointment"
CalenDoc.FIELDSETTEXT "AppointmentType", "3"
CalenDoc.FIELDSETTEXT "StartDate", CStr(Format(AppDate, "mm/dd/yy")
CalenDoc.FIELDSETTEXT "EndDate", CStr(Format(AppDate, "mm/dd/yy")
CalenDoc.FIELDSETTEXT "Subject", Subject
CalenDoc.FIELDSETTEXT "Body", Body
CalenDoc.FIELDSETTEXT "SendTo", "EMAILADDRESS"
CalenDoc.Send True, "EMAILADDRESS"
CalenDoc.Save False, False, False
'CalenDoc.SaveMessageOnSend True
CalenDoc.Close
Set Maildb = Nothing
Set CalenDoc = Nothing
Set workspace = Nothing
End Sub