Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

IBM Lotus Notes/Domino 8.5 Forum (includes Lotus Notes Traveler)

Sign in to participate Previous Next
Subject: LotusScript COM: Open NotesDocument in UI
Feedback Type: Question
Product Area: Database
Technical Area: Application Development
Platform: Windows
Release: 8.5
Reproducible: Always

I am working on coexistence between Microsoft Outlook and IBM Lotus Notes.

Outlook Items = Notes Documents

I am adding context menu's in Outlook where a user clicks any Item in MS Outlook would display a "Open Document" option. I have everything working to the point where I need to display the document in Lotus Notes.

I can open Notes databases through COM, got to a view and highlight a document. But I cannot figure out a way to open the document through COM.

The code below shows how I'm doing this and it errors out at NotesUIWorkspace.EditDocument(LNdoc) line.

I tried returning to a NotesUIDocument, that errors out, I tried all combinations of input parameters to EditDocument(boolvalue, doc, boolvalue).

Is there an alternative solution to open a document through com?

Public Sub OpenLNDatabase(servername As String, dbname As String, docID As String, docKey As String)

Dim ws As Object '(NotesUIWorkSpace)
Dim cLotusNotes As New clsLotusNotes
Dim LNDb As NotesDatabase
Dim LNdoc as NotesDocument
Dim LNSession as new NotesSession

If (servername = "" Or dbname = "") Then
MsgBox "I am not configured to open this Lotus Notes database. Please contact support", vbCritical, Title
Exit Sub
End If

Set LNSession = New NotesSession
Call cLotusNotes.session.Initialize

Set ws = CreateObject("Notes.NotesUIWorkspace")

Set LNDb = LNSession.GetDatabase(servername, dbname)

If (docID = "" And docKey = "") Then
'THIS WORKS
Call ws.OpenDatabase(servername, dbname, "", "", "")
Else
'open document in database by docuid
If (docID <> "") Then
Set LNDoc = LNDb.GetDocumentByUNID(docID) 'works
Call ws.EDITDOCUMENT(LNDoc) 'automation error

Else
If (docKey <> "") Then
'search a view for a field value
'to get a handle to a notesdocument.
End If
End If

End If

Set ws = Nothing

End Sub


Feedback number WEBB89ZM6B created by Steve Lohja on 10/07/2010

Status: Open
Comments:

LotusScript COM: Open NotesDocument... (Steve Lohja 7.Oct.10)
. . Use NotesURL (Simon Delicata 11.Oct.10)




Printer-friendly

Search this forum


Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support


 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM Web Content Manager
Lotus Domino Document Manager
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow