LotusScript action button manages Lotus Notes mail files

LotusScript action button manages Lotus Notes mail files

This action button features sub-actions that lets Lotus Notes
Related resources from SearchDomino.com:
Top 10 LotusScript tips

LotusScript Learning Guide

LotusScript Reference Center

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.

    By submitting your registration information to SearchDomino.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchDomino.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

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.


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


    (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

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.