LotusScript action button manages Lotus Notes mail files

This LotusScript code creates an action button that, when applied to any view or folder in Lotus Notes mail files, makes mail file management easy. Using a single action button, Lotus Notes Domino users can easily manage their mail files, investigate file sizes, get quota details, delete attachments and empty message trash bins.

This action button features sub-actions that lets Lotus Notes users manage their mail files, investigate file sizes, get quota details, delete attachments and empty trash bins using a single button.

Apply this action button to any view or folder in Lotus Notes mail files. "Inbox," "All Documents," "Sent," and a custom view for "all with Attachments" work well.

Although some of these actions are redundant and can be accessed elsewhere, users benefit from having them bundled.

  1. Create an action button with sub actions. You'll want to a use title similar to "Mail Management Tools."
  2. Create an action under "Mail Management Tools" and call it "Get Mail File Size." Add the following LotusScript to the On Click event:
    Sub Click(Source As Button)
            Dim MFSsession As New NotesSession
            Dim MFSdb As NotesDatabase
            Set MFSdb = MFSsession.CurrentDatabase
            FileSize=MFSdb.Size/1024/1024
            Messagebox "Your Mail file size is 
    currently " & Cstr(FileSize)& " MB",64,"Mail File Size"
            End Sub
    
  3. Create an action under "Mail Management Tools" and call it "Get Quota Details." Add the following LotusScript to "Initialize."

    Note: This will only work if you use quotas on your mail files.

    LotusScript for action button
    (Click on code for enlarged view and script download.)

     

  4. Create an action under "Mail Management Tools" and call it "Delete Selected Attachment(s)." Next, add the following LotusScript to "Initialize."

    LotusScript for action button
    (Click on code for enlarged view and script download.)

     

  5. Create a View to display email messages with attachments and use the @Attachments function in the view selection criteria.
  6. Create an action under "Mail Management Tools" and call it "View all with Attachments." Add this Formula language code to the action:
    @PostedCommand([OpenView];"Attachments")
    
  7. Create an action under "Mail Management Tools" and call it "Empty Trash." Add the following Formula language code to the action:
    @PostedCommand([OpenView];"($SoftDeletions)");
    @Command([ToolsRunMacro];"(Empty Trash)")
    

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

This tip was submitted to the SearchDomino.com tip library by member Jessica Fyke. 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 October 2008

Dig deeper on Lotus Notes Domino Mailbox Management

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