EditDocument on NotesDocument

Hi!

I'm new to Notes, and have recently come upon a very stubborn problem:

I want to find a specific NotesDocument in the database (I do this via LotusScript in an Action-button - no problem there) and then let the user edit this document DIRECTLY. -Like I can do with the selected document in a view, by the Formula @Command([EditDocument])...

How to?!
Is this not a normal thing to do?!

Regards
/Torbjörn Josefsson
tobloAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PaebdbCommented:
Use the EditDocument method of UIWorkspace:

Sub Click(Source As Button)
  Dim workspace As New NotesUIWorkspace
  Dim uidoc As NotesUIDocument
  Set uidoc = workspace.EditDocument( True )
  Call uidoc.GotoField( "Body" )
End Sub
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tobloAuthor Commented:
Thanks!

To be specific, I did like this:

Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView( "MyView" )
      
Set dc = view.GetAllDocumentsByKey("the searchstring", False)
      
Dim workspace As New NotesUIWorkspace
      
Set doc = dc.GetFirstDocument

Dim uidoc As NotesUIDocument      

'HERE is where I decide what document to display!
Set uidoc = workspace.EditDocument( True , doc)
'To get focus..
Call uidoc.GotoField("XLNamn")
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.