Tip

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

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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:

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.