Send meeting invitation to Outlook with LotusScript

Hi!How do I send a meeting invitation to Outlook from a Lotuscript agent?

My company has moved to Outlook but we still have Lotus Notes applications. Currently, if I manually create a meeting invitation with myself as a recipient in Lotus Notes I will get an invitation in Lotus Notes and also an invitation in Outlook.

I have an agent that creates a Lotus Notes invitation & calendar entry but when it shows up in Outlook it looks like a memo.

Here’s a code snippet. Can anyone tell me what I’m doing wrong? I appreciate any response!

Dim db As New NotesDatabase (“CFCNotes/CFC”, “mail\mymail.nsf”)

Dim doc As NotesDocument

Set doc = db.CreateDocument



Dim tmpItem As NotesItem



doc.Form = "Appointment"

doc.AppointmentType = "3"

doc.Subject = "TEST MEETING"

doc.ORGTABLE = "C0"

doc.REQUIREDATTENDEES = "testmail@testco.com@testco1.onmicrosoft.com@test"	doc.AltRequiredNames = "testmail@testco.com@testco1.onmicrosoft.com@test"	doc.INetRequiredNames = "testmail@testco.com"

doc.Recipients="testmail@testco.com@testco1.onmicrosoft.com@test" 

doc.Principal=session.UserName

Call doc.ReplaceItemValue ("$PublicAccess", "1")

Call doc.ReplaceItemValue ("$AltPrincipal", session.UserName)

Call doc.ReplaceItemValue ("$BusyName", session.UserName)

Call doc.ReplaceItemValue ("$BusyPriority", "1")

	

'START TIME

Dim dateTime As New NotesDateTime( Now )

Call dateTime.AdjustMinute( 15)



Set doc.StartDateTime = dateTime

Set doc.StartDate = dateTime

Set doc.StartTime = dateTime

Set doc.CalendarDateTime = dateTime	



'END TIME

Dim dateTime2 As New NotesDateTime( Now )

Call dateTime2.AdjustHour(2)

Set doc.EndDateTime = dateTime2

Set doc.EndDate = dateTime2

Set doc.EndTime = dateTime2



Call doc.ReplaceItemValue ("$NoPurge", dateTime2)

doc.SendTo = "testmail@testco.com@testco1.onmicrosoft.com@test"



Call doc.computeWithForm(True, False)

Call doc.save(False, False)

Call doc.send(False)

Thanks for your help!

Subject: Suggestion

Does your code work ok if you send it to a Notes client? Does a invite to that user work if you send it from a notes client?

I think the best would be is to send an at ics file to the user.

Here is some technote I found about inter connectivity but it is based on a client sending the invite?

https://www-304.ibm.com/support/docview.wss?uid=swg21580746

if this technote help I would suggest catching the email midstream (before smtp router) and seeing what fields might be getting populated that you might be missing in your code

Subject: Thank you! Will check it out

Thank you for your response! I’ll check it out.