1

I have a button "Move Document", supposedly it should move selected document to another folder. I used PutAllInFolder but it only copies the document to "Move Document" folder. Is there another method that can totally move them to another folder or maybe a view?

Here's my code:

  Sub Click(Source As Button)
   Dim session As New notessession
   Dim dbCur As notesdatabase
   Set dbCur = session.currentdatabase

   Dim collSelected As notesdocumentcollection
   Set collSelected = dbCur.UnprocessedDocuments

   Call collSelected.PutAllInFolder("Move Document")
   Dim uiw As New notesuiworkspace
   Call uiw.viewrefresh
  End Sub
drayl
  • 261
  • 2
  • 8
  • 21
  • Views are based solely on selection criteria, you can't "move" a doc into a view. For a "total" move between folders, see @Per's answer. – LRE May 02 '13 at 04:37

1 Answers1

7

Use the RemoveAllFromFolder method on the collection.

Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76
  • 2
    Just to add some clarification: A folder in Lotus Notes is just a Colleciton of Links to the contained documents. Therefor you can have documents in as many folders simultaneously as you want, without duplicating space. That's why a "PutInFolder" or "PutAllInFolder" does exactly this: It puts the documents in the folder... it does NOT remove it from the original folder. – Tode May 02 '13 at 11:41