×
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

EditDocument not working

EditDocument not working

EditDocument not working

(OP)
Hi there,

I am trying to open up a database document for a user to edit, but I'm battling to get workspace and editdocument to work.  When I try to use the EditDocument method I get an error of Runtime 7419 - Incorrect Argument type: object expected.

I can't seem to use dim Workspace as new NotesUIWorkspace - it doesn't allow the work new, so I haven't declared it and ahve simply used it as an object.

Any ideas on how to open this document for the user to review/edit?  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: EditDocument not working

try to declare a new notesUIdocument (for example UIDOC)

then try this code , to edit the document:

set UIDOC = workspace.editdocument(True,DomDoc,True)

let me know if it works;

hi.
ps: sorry for my English ...

RE: EditDocument not working

(OP)
Hi Swissonline,

I can't declare a new notesuidoc or a new notesUIWorkspace.  I can't use the NEW word at all. I have to createobject("Notes.NotesUIWorkspace"), and that process doesn't work with a NotesUIDocument...

I've tried declaring UIDOC as a NotesUIDocument and then running the code below, but that still doesn't work.

set UIDOC = workspace.editdocument(True,DomDoc,True)

 

RE: EditDocument not working

ok,
if you don't have already tried,
put in this code , to edit the document :

Call workspace.EditDocument(true,DomDoc,true)

maybe...

hi.

RE: EditDocument not working

(OP)
Hi Swissonline,

Hehe.. Nope, still doesn't work...  It's strange though cos I can get it to open and display the database for me but I can't get it to open the single database entry that I'm interested in!

Leanne

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