Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Notes Calendar Invite From VBA ...just a little help

Status
Not open for further replies.

timmy773

Technical User
Nov 24, 2002
17
US
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
 
I've got the same problem...:

" 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"

Have you resolve it ?

Thanks in advance
 
Unfortunately, no, I'm still looking for an answer. It might be worth another post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top