Manage Learn to apply best practices and optimize your operations.

Copy All Documents In A View

The last hot tip by Simon Mooney was good (except for the two mistakes which
prevent it from working (Dim copied Documents as integer - spelt interger, and
set doc = dc.getnextdocument(doc) which was mis-types as set doc =
collection.getnext...)

The code below is even more useful because it copies all the documents in a
view (Eg It can archive the contents of a view/ Folder). The code below copies
all of the groups documents from the address book to another database.
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim db2 As New NotesDatabase("","Target.NSF")
Dim view As NotesView
Dim doc As NotesDocument

Set db = session.CurrentDatabase
Set view = db.GetView("Groups")
Set doc = view.GetFirstDocument

While Not doc Is Nothing
Call doc.CopyToDatabase(db2)
Set doc = view.getnextdocument(doc)
Wend

End Sub

This was last published in November 2000

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close