Hello there,
I am new to LotusScript programming. But I have a question on how to send an invitation request thru a notes form thru a lotusscript.
I tried to find it in the forum but I could not find similar problem. I manage to be able to send it but it gives error (Subscript out of range error) when the recipient opens it. Also, all the fields related to the meeting are blanks.
Below is my code which I put in a action button:
Dim db As Notesdatabase
Dim session As New NotesSession
Dim workspace As New notesuiworkspace
Dim uidoc As notesuidocument
Dim docCurr As notesdocument
Dim startdttm As NotesDateTime
Dim enddttm As NotesDateTime
Dim window As NotesDateRange
Dim names As String
Dim dur As Integer
Dim username As String
Set uidoc = workspace.currentdocument
Set docCurr = uidoc.Document
Set db = New notesdatabase("", "")
Call db.openmail
Dim cEntry As New NotesDocument(db)
Dim itemIcon As NotesItem
username = session.UserName
cEntry.From = docCurr.From(0)
cEntry.Subject = "This is a test"
cEntry.Form = "Notice"
cEntry.AppointmentType = "2"
cEntry.tmpWasMailed = "1"
cEntry.ExcludeFromView = "D"
cEntry.OrgTable = "P0"
cEntry.Location = "location"
cEntry.Logo = "stdNotesLtr0"
cEntry.StartDate = "09/03/2004 5:00:00 PM"
cEntry.EndDate = "09/03/2004 6:00:00 PM"
Call cEntry.save(True, True)
Call cEntry.ReplaceItemValue( "SendTo", "You" )
Call cEntry.Send(False)
Messagebox "This document has been sent as an invitation message. ", 0, "Add Complete"
I appreciate any help.