Ask the Expert

How to modify a Lotus Notes signature file using LotusScript

How can I modify Lotus Notes mail preferences (change the signature) using LotusScript?

Such preferences are stored in a profile document in the Lotus Notes user's mailbox. To change them programmatically, simple use the following code:

Dim Preferences As notesdocument
Set Preferences = MailBox.GetProfileDocument
("CalendarProfile")

Where "MailBox" points to the Lotus Notes user's mail database. If you are running the code within the mail database, this is done by calling:

Dim session as new notesSession
Dim mailbox as notesDatabase
Set MailBox=Session.CurrentDatabase

Otherwise, use the Formula language command @MailDbname or methods of the LotusScript object NotesRegistration to find the user's Lotus Notes mail file.

Once you have the profile document, you will need to either point it to an HTML signature file to add the signature text directly into the profile document. To use an external HTML document (which must exist on every machine where the mailfile is used), set the "SignatureOption" field to "2" and put the pathname of the Lotus Notes signature file in the Signature_1 field.

To store a signature in the profile itself, set "SignatureOption" to "1" and enter the text in the field "Signature_1". When you are done, be sure to call the save method on the profile document.

Incidentally, I figured this out a while back by looking at my own mail file in Domino Designer and examining the "Tools\Preferences" action on the "$Inbox" folder, which led to the "(Preferences)" agent, and then to the "Calendar Profile" form.

Do you have comments on this Ask the Expert Q&A? Let us know.

Related information from SearchDomino.com:

  • Learning Guide: LotusScript
  • FAQ: LotusScript
  • Reference Center: LotusScript tips and resources
  • This was first published in September 2006

    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: