Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EditDocument not working

Status
Not open for further replies.

LeanneGodney

Technical User
Mar 7, 2002
175
GB
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


 
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 ...
 
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)

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

Call workspace.EditDocument(true,DomDoc,true)

maybe...

hi.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top