?
Solved

Display Notes Email from MS Access

Posted on 2009-07-09
4
Medium Priority
?
248 Views
Last Modified: 2013-12-18
Hi, I am trying to search for a particular Lotus Notes email using the UniversalID of that email and once found, open/display that email in Notes using code in MS Access VBA.  Is this possible?  I cannot use LotusScript.  Thanks, Hammer8
0
Comment
Question by:Hammer8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 2000 total points
ID: 24814970
Sure,

Here's a function that you can use...
Public Sub OpenMemoByUnid(ByVal unid As String)
 
  ' open current user's email file
  Dim sess As Object, email As Object, doc As Object
  Set sess = CreateObject("Notes.NotesSession")
  Set email = sess.GetDatabase("", "")
  email.OpenMail
  
  ' get the document
  Set doc = email.GetDocumentByUNID(unid)
  If (doc Is Nothing) Then
    MsgBox ("Unable to locate the specified document!")
  Else
    Dim ws As Object
    Set ws = CreateObject("Notes.NotesUIWorkspace")
    Call ws.EditDocument(True, doc)
    Call AppActivate(ws.CurrentDocument.WindowTitle)
    
  End If
  
End Sub

Open in new window

0
 

Author Comment

by:Hammer8
ID: 24815257
Wow!  Great.  Is there a way to open the email, but not put it in Edit mode?  Thanks, Hammer8
0
 

Author Comment

by:Hammer8
ID: 24815509
I found it - chance true to false in EditDocument.  However, I sometimes get a run time error 5 on
Call AppActivate(ws.CurrentDocument.WindowTitle)

Appending " - IBM Lotus Notes" seems to help some, but still get the error?
0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 24816020
I've never seen that function raise an error before.

You can either leave it out or tell VB to ignore the error by placing this line before the call to AppActivate.

    On Error Resume Next
0

Featured Post

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question