copy stationery to multiple hcl notes mailboxes using lotusscript code

HCL Notes and Domino: Tips & Tricks

Copy stationery to multiple HCL Notes mailboxes using LotusScript code
November 6, 2014

By Lance Zakin, HCL CASA, CAAD
Notes and Domino
NotesMail - HCL BP
Your company might want a group of users to use specific stationery (message template) when sending emails to customers. The code below can be copy/pasted into a Notes agent or button. It will allow a Domino administrator to copy stationery to multiple Notes mailboxes. The user can use the stationery by clicking Tools - Stationery in their mailbox. Stationery previously copied using this code will be deleted prior to copying new stationery.

NOTE: The Domino administrator must have at least Depositor access to the user mailboxes. After executing the code the Domino administrator can click the Notes status bar to see if any errors displayed.

Sub Click(Source As Button)
' Coded by NotesMail Consulting -
Const TITLE = "Copy Stationery to user mailboxes"
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim db, dbDD, dbTarget As NotesDatabase
Dim viewDD, viewSource , viewTarget As NotesView
Dim docGrp, docPerson, docSource, docTarget As NotesDocument
Dim vcColl As NotesViewEntryCollection
Dim entry As NotesViewEntry
Dim picklist As Variant
Dim askme As Integer

On Error Goto ErrHandler
Set db = session.CurrentDatabase
Print TITLE & " >> Starting..."

' Prompt user for IBM DD group
Print TITLE & " >> User prompted to select an IBM DD group."
Msgbox "Select an IBM DD group at next prompt. The Memo / Personal Stationery in " & db.title & " mailbox will be copied to the mailboxes of members listed in the group.", , TITLE
picklist = ws.PickListStrings(PICKLIST_NAMES)
[The full code has been removed since it is now maintained by NotesMail in a product called Mailbox Stationery Manager:]

Reference Sources

IBM Notes 9 - Creating and using stationery
Stationery helps you create an email template with text or graphics, letterhead, and a recipient list that you can re-use. This is convenient when you want to create a newsletter, or if you frequently send a message, such as a status report, in the same format.