We have an app that lets users enter meeting information that really doesn’t go into any calendar (we use Domino but not the mail files). They are just documents. Our users now want the ability to have that meeting info automatically entered into their Outlook/Exchange calendar. We capture enough info to create a “.vcs” file that we email to the users and they can click on it and add it to their Outlook calendar. However, they want better integration with their Exchange calendar. We do not want to use the Domino calendar if at all possible, so DAO is not an opton.
Are their any API’s available or has anyone done anything similar.
Any ideas would be greatly appreciated.
Subject: Creating a Outlook/Exchange meeting from LotusScript
This was written in R4 notes but should be a foundation for youhttp://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/477a6505f50a24178525688d00704df4?OpenDocument&Highlight=0,coolidge
John
Subject: RE: Creating a Outlook/Exchange meeting from LotusScript
Thanks John. I did get this to work. Any thoughts on using a technique like this using a web client? Our users can enter calendar info using a Notes or a web client.
Subject: RE: Creating a Outlook/Exchange meeting from LotusScript
Just chage the code to be called from a webquerysave agent and rub in the back endJOhn
Subject: RE: Creating a Outlook/Exchange meeting from LotusScript
John,
Late to this post but I have two questions:
I just tried using the webquerysave event to run the “Add to Calendar hidden” agent and nothing seems to happen. Does the agent itself need to be modified or am I trying to launch it the wrong way?
Who does the code think is the user when connecting to Outlook? Does the code look at the user’s Windows environment to know the person or is the Notes login somehow connected to the Outlook user name? This is important for me because the Notes/Web app that might use this code does not require user login so there is no Notes user name involved.
Thanks for any insights.
Doug
Agent code:
Sub Initialize
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
’ Get Current Document
Set uidoc = ws.Currentdocument
Set doc = uidoc.document
’ Get Document Fields
Startdt = uidoc.FieldGetText("Start")
Enddt = uidoc.FieldGetText("end")
Body = uidoc.FieldGetText("desc")
Subject = uidoc.FieldGetText("appSubject")
' Set Outlook object
Set appOutl = CreateObject("Outlook.Application")
Set myNameSpace = appOutl.GetNameSpace("MAPI")
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(1)
’ Set Appointment fields
With myItem
.Start = Startdt
.End = Enddt
.Body = Body
.Subject = Subject
.save
End With
' Close object references.
Set appOutl = Nothing
Set myItem = Nothing
End Sub
Subject: RE: Creating a Outlook/Exchange meeting from LotusScript
OK After actually thinking about this in detail a webquerysave agent runs on the server so I do not believe this will work as first thought. but why not create an ical in script and send it along. If i have time today i will look into itJohn
Subject: RE: Creating a Outlook/Exchange meeting from LotusScript
John,
This is my first WQS agent so the agent, as written, dies. I rewrote it as below and it fails at the point outlook is accessed.
ical is new to me - I’ll poke around and see what I can find. If you gin up a solution, just post it back here.
Thank you for your reply - much appreciated.
Doug
revised code:
Sub Initialize
Print "start"
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim StartDT As Variant
Dim Enddt As Variant
Dim Body As String
Dim Subject As String
Dim appOutl As Variant
Dim myNameSpace As Variant
Dim myOlApp As Variant
Dim myItem As Variant
’ Get Current Document
Set doc = session.documentcontext
’ Get Document Fields
Startdt = Doc.Start(0)
Enddt = Doc.end(0)
Body = Doc.desc(0)
Subject = Doc.appSubject(0)
' Set Outlook object
' Code dies here
Set appOutl = CreateObject("Outlook.Application")
Set myNameSpace = appOutl.GetNameSpace("MAPI")
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(1)
’ Set Appointment fields
With myItem
.Start = Startdt
.End = Enddt
.Body = Body
.Subject = Subject
.save
End With
' Close object references.
Set appOutl = Nothing
Set myItem = Nothing
End Sub