×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Open LOTUS NOTES database object from within Access

Open LOTUS NOTES database object from within Access

Open LOTUS NOTES database object from within Access

(OP)
Hi there,

I'm aware of how to grab a notesitem or notesdocument in vba from access, but I'm unsure as to how to DISPLAY it for the user... If I'm storing the Notes ID in table I can use this to access the document:

Set DomSession = CreateObject("Lotus.NotesSession")
DomSession.Initialize
Set DomDir = DomSession.GetDatabase("0BMT00NA02/CHASE", "apps\cpcolt.nsf")

Set DomDoc = DomDir.GetDocumentByUNID("Hefefekei224450023")

But how do I then instruct Lotus notes to OPEN that document and display it???

Any help would be well appreciated.

Thanks!

RE: Open LOTUS NOTES database object from within Access

In order to display the document, you need to declare a WORKSPACE in LotusNotes:

Dim workspace As New NotesUIWorkspace

then try this:

Call workspace.EditDocument( True, DomDoc )

Leslie

RE: Open LOTUS NOTES database object from within Access

(OP)
Hi Leslie,

Thanks for that... Trouble is my code won't allow me to use the NEW work in your dim workspace text... It lets me do dim workspace as notesuiworkspace, but I can't put the word new in!

Any idea why?  Is there some other way I can create a new workspace without doing it in teh declaration?

Thanks!
Leanne

RE: Open LOTUS NOTES database object from within Access

Here's an example from the OLE help in NotesDesigner:

Set workspace = CreateObject("Notes.NotesUIWorkspace")
Set doc = workspace.CurrentDocument

Leslie

RE: Open LOTUS NOTES database object from within Access

(OP)
Hi Leslie,

Thanks for that - I am able to create the workspace object now (but only if I don't declare it).  When I true to use the EditDocument method I get an error of Runtime 7419 - Incorrect Argument type: object expected.

Any ideas?  this is my code:

Set DomSession = CreateObject("Lotus.NotesSession")
DomSession.Initialize MyPassword
Set DomDir = DomSession.GetDatabase("0BMT00NA02/CHASE", "apps\cpcolt.nsf")
Set DomContacts = DomDir.GetView("Admin\All By Status")

Set DomDoc = DomDir.GetDocumentByUNID("1E051FF601BE882280256FA1001D329D")
Set Workspace = CreateObject("Notes.NotesUIWorkspace")

Workspace.EDITDOCUMENT False, DomDoc

RE: Open LOTUS NOTES database object from within Access

I'm pretty sure you need the parens:

Workspace.EDITDOCUMENT (False, DomDoc)

Is DomDoc declared as a NotesDocument?

Leslie

RE: Open LOTUS NOTES database object from within Access

(OP)
You can't put the parenthesis if you're not using SET, and you have to use parenthesis if you are.

I've tried it with declaring DomDocs as a notesdocument and also without... same result.

I'm doing this in VBA, by the way... does that make a difference?

RE: Open LOTUS NOTES database object from within Access

I would suggest searching the Access forums for Lotus Notes and I know there are some examples of access Notes, but I don't recall if they deal specifically with being able to show the document in a workspace.

Forum181
Forum705

HTH

Leslie

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close