Archiving Lotus Notes documents to a specified folder

Archiving Lotus Notes documents is typically a laborious task -- but not anymore. SearchDomino.com member Bob Gouin has created an agent that simplifies the process.

A common complaint about archiving Lotus Notes documents to specific folders is that there are too many steps involved. You have to select the document, move it to the specified folder, select the document again, and then finally select "archive" or "drag/drop."

To address this issue, I've created an agent that reduces the number of steps required to archive Lotus Notes documents to specified folders. This agent allows the end user to archive directly to a folder in their Lotus Notes archive database.

The Lotus Notes agent prompts the end user for the folder they'd like to archive, moves the document to the specified folder, and then archives the selected Lotus Notes documents to the archive database -- while maintaining the documents in the specified folder.

The agent saves Lotus Notes users a few steps, and makes archiving Lotus Notes documents a little easier.

You can name the agent: ArchiveSelected Documents To Folders | agent_archiveToFolder.

 Option Public
Option Declare
Use "Common"


Sub Initialize
On Error Goto Trap 
Dim s As New notessession
Dim uiws As New notesuiworkspace 
Dim db As notesdatabase
Dim coll As notesdocumentcollection
Dim StringTable As New mailtoolsstringtable   
 
'get a handle on the current database
Set db = s.currentdatabase
 
'get a handle on the selected documents to archive
Set coll = db.unprocesseddocuments
 
'prompt for users input, verify to archive
If YesNoPrompt(StringTable.GetString
(TOOL_STRING+76,coll.count),
StringTable.GetString(TOOL_STRING+75,Null)) Then 
  
Archive:   
'move the collection of documents to the folder 
Call uiws.folder(, False)
  
'archive the documents
Call db.ArchiveNow(coll)  
  
'refresh the view
Call uiws.Viewrefresh()
  
End If 'prompt for users input, verify to archive   
 
Exit Sub
 
Trap:
'edit archive settings
If YesNoPrompt(Error$ & Chr(10) & 
StringTable.GetString(TOOL_STRING+74,Null),
StringTable.GetString(TOOL_STRING+75,Null)) Then
If uiws.Currentdatabase.Editarchivesettings() Then
Resume Archive
Else
End
End If
End If 
 
End Sub

Do you have comments on this tip? Let us know.

Related information from SearchDomino.com:

  • Tip: Monitoring scheduled agents by email
  • Tip: Techniques for writing agents
  • Tip: A Lotus Notes approval reminder agent
  • Tip: Changing a Lotus Notes database mail file from 'archive' to 'mail'
  • Reference Center: Agent tips and resources

    This tip was submitted to the SearchDomino.com tip library by member Bob Gouin. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

  • This was first published in December 2006

    Dig deeper on Lotus Notes Domino Archiving

    0 comments

    Oldest 

    Forgot Password?

    No problem! Submit your e-mail address below. We'll send you an email containing your password.

    Your password has been sent to:

    -ADS BY GOOGLE

    SearchWinIT

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

    SearchEnterpriseLinux

    SearchVirtualDataCentre.co.UK

    Close