I am looking to automate a process through LabVIEW which will open a document in Lotus Notes using COM/ActiveX.
I am able to read the database, search through it to find the documents I want, and get the text out of it that I want. But I cannot seem to figure out how to open a document in Lotus Notes itself by using COM.
The COM interface does not have access to the Notes front end. There was a thread earlier today dealing with that very fact. You need to use the Lotus Notes Automation Objects (OLE) to access the front end (UI).
Yep. You’ll need to do (the equivalent of)… Set session = CreateObject(“Notes.NotesSession”)
Then get an object reference for the appropriate NotesDocument, he same way you do with COM.
Then do (the equivalent of)… Set workspace = CreateObject(“Notes.NotesUIWorkspace”)
And then call… workspace.EditDocument(…) with the second argument specifying the NotesDocument object reference.
(Disclaimer: I don’t remember for sure whether EditDocument works with the NotesDocument argument in the OLE classes. I think it does, but if not, you’ll have to actually simulate the navigation through the Notes database, possibly by going through a view that is sorted on a unique key that allows you to locate the document.
Thanks for the help. I am now able to open a document in Lotus Notes through the OLE. But, it is not the correct document
It will only open the document that is selected (highlighted) in Lotus Notes. I must have to “navigate” to the document as you stated. Do I have to go through the view properties and methods to do this??
I also dropped all the COM and am now using only the OLE. Thanks.
I was able to accomplish what I was looking for. I had to open a view, search the view for the document I wanted, select the document, and then I could edit the document.