Q
Problem solve Get help with specific problems with your technologies, process and projects.

Defining letterhead in new email programmatically

How do I programmatically choose or define the letterhead when creating a new e-mail document to send? (Note: I'm using Lotus Domino Objects as a reference in VB6.)
That depends what you mean by create a new e-mail. If you want to open the new e-mail on-screen for the user to edit and send, locate the stationery document (using NotesView against the Stationery view) and just use the EditDocument method to open it on screen. That's what the Notes mail file does (which you can confirm by turning on the Notes debugger and selecting the Memo from stationery function -- the source code is public for everything the mail file does). Before you call EditDocument, use the NotesRichTextItem methods to populate that middle field (called Body), then call NotesRichTextItem.Update to make sure the user sees the changes you made.

But if you mean create the memo entirely in the backend, without letting the user edit, the best way is to use the NotesView class to locate the document you want. Don't bother trying to send out an actual Stationery memo. Just use the regular Memo form fields, Subject and Body. Use NotesRichTextItem.AppendRTItem to put the three pieces of the stationery -- Header, Body and Footer -- together into one Body field in the new memo, inserting your own content where you like.

Do you have comments on this Ask the Expert question and response? Let us know.

Dig Deeper on Lotus Notes Domino Application Development

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

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

SearchDataCenter

SearchContentManagement

Close