Open Document In Database using COM

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.

Subject: Open Document In Database 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).

Subject: RE: Open Document In Database using COM

My apologies, I just looked at my Domino Objects sheet and right there it says “Not supported by COM”.

Ok, so then, using OLE, how can I open the document in Lotus notes.

I tried to follow this thread: http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/0cdcc993dc129c0b85256fac0050d4fc?OpenDocument&Highlight=0,open,document,ole

But i couldnt get it to do anything (that I could see).

Thanks for the help.

Subject: RE: Open Document In Database using COM

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.

-rich

Subject: RE: Open Document In Database using COM

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 :slight_smile:

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.

Subject: Open Document In Database using COM

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.

thanks for the help.

Subject: RE: Open Document In Database using COM

Can you share the code with which you accomplished that?

Subject: RE: Open Document In Database using COM

I used LabVIEW, which is not a text language, so I cant copy and paste the text.