merging lotus notes archives databases

Posted on 2009-04-30
Last Modified: 2013-11-16
I have two lotus notes 7.0 archive databases that I would like to merge together. Is this even possible
Question by:btbsjtremper
    LVL 22

    Accepted Solution

    Is design of those two databases the same (only different documents)?
    If yes, you can copy documents from the source db and delete it afterwards.
    You'll have to have view that shows all docs of that database so you can do it in one step:

       Select all docs (ctrl+a)
       Copy (ctrl+c)

       Open destination db and paste (ctrl+v).

    If there are response documents in source db you'll have to be careful, because pasting the response doc while you're positioned on main doc makes them responses to that main doc. To avoid that - select category in any view and then paste. If all docs are main docs then you don't have to worry about this.

    Maybe it's best to zip the source db instead of deleting it.

    Author Comment

    the design is the same, but there are a ton of folders in each archive that have been created. those won't be carried over correct?
    LVL 22

    Assisted Solution

    Here's my code on SearchDomino that handles folders:,289483,sid4_gci1179314,00.html
    LVL 22

    Expert Comment

    Have you succeeded in moving those documents?
    Ask if you got stuck...

    Author Comment

    no luck so far
    LVL 22

    Expert Comment

    What happened?

    Go step by step and ask specific questions.

    Author Comment

    i'm not paying for a service on that website, but i will give you points for the first answer
    LVL 22

    Expert Comment

    Thanks for the points.
    You don't have to pay to use SearchDomino, just register.

    Nevertheless, here's the code:
      Move folders from one Notes database to another using a LotusScript agent
      Marko Bonaci
      When you run the LotusScript code below, it will ask you which folders you want to move from a current Notes/Domino database 
      and to which database you want them moved.
    %END REM
    Sub Initialize
        Dim s As New NotesSession
        Dim w As New NotesUIWorkspace
        Dim dbSource As NotesDatabase, dbDest As NotesDatabase
        Dim source As NotesView, dest As NotesView
        Dim vc As NotesViewEntryCollection
        Dim docDest As NotesDocument
        Dim ve As NotesViewEntry
        Dim folders() As String
        Dim i As Integer
        Dim ret, rez
        Set dbSource = s.CurrentDatabase
        Forall v In dbSource.Views
            If v.IsFolder Then
                i = i + 1
                Redim Preserve folders( i - 1 ) As String
                folders( i - 1 ) = v.Name
            End If
        End Forall
        ret = w.Prompt( PROMPT_OKCANCELLISTMULT, "Folder selection", "Select one or more folders to move.", folders(0), folders )
        If Isempty( ret ) Then
            Messagebox "User canceled", , "Folder not selected"
            Exit Sub
            Forall f In ret    
                Set source = dbSource.GetView( f )
                Set vc = source.AllEntries
                rez = w.Prompt( 13, "Database selection", 
    "Choose the database to move the folder to" )
                If Isempty( rez ) Then Messagebox "User canceled", , 
    "Database not selected" : Exit Sub
                Set dbDest = s.GetDatabase( rez(0), rez(1), False )
                Call dbDest.EnableFolder( f )
                Set ve = vc.GetFirstEntry
                Do Until ve Is Nothing
                    Set docDest = ve.Document.CopyToDatabase( dbDest )
                    Call docDest.PutInFolder( f )
                    Set ve = vc.GetNextEntry( ve )
                Call vc.RemoveAllFromFolder( f )
                Call source.Remove
            End Forall
        End If
    End Sub
    Here's a quick add-on that will allow you to copy the design of the folder as well.
    Sub Initialize
    ...<snip> ...
    'Code added
    Dim col As NotesViewColumn
    ... <snip> ...
    Set dbDest = s.GetDatabase
    ( rez(0), rez(1), False )
    Call dbDest.EnableFolder( f )
    'Code added
    Set dest = dbDest.GetView( f )
    'Copy the columns from the 
    source to the destination folder 
    While dest.ColumnCount > 0
    Call dest.RemoveColumn(dest.ColumnCount)
    For i = 0 To source.ColumnCount-1
    Set col = dest.CopyColumn(source.Columns(i), i+1) 
    'Code added
    ... <snip> ...
    End Sub

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
    For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now