Link to home
Start Free TrialLog in
Avatar of KDrago
KDrago

asked on

Create and populate stationery in lotusscript

Hello -

Hoping I can get a good overview of how to go about doing the following.  I need to create a function that will allow users to create and save mail templates (stationery) in a database.  The users then need to be able to open mail received in this database, click a "template" button that will create a reply (with history) formatted with the template they selected.  I'd like to grab information from the email to use in populating the greeting (ie Dear <fromName>).

 - So far I have created a "template" form that has the following fields:
                  templateName
                  templateDescription
                  Body

- I have also created a button on the inbound email form that displays a picklist of the templates that can be used.  

After this I am kind of stuck as to how to create the reply memo using the body of the saved template.  Also, don't know how to get the history appended to this template.


I tried looking at the mail template for guidance, but the notes templates are a little too overdone for what I need and therefore more confusing than just doing it from scratch.  I would like a solution using lotusscript.


Thanks!
Avatar of marilyng
marilyng

Basically, your templates are responses, and in the FORM properties for these templates, VERY EASY,

Go to the SECOND tab
Check:  Formula inherits values from selected document
Check: Inherit entire document into Rich Text Field, then specify "Body" as your RT Field, and as "Collapsible Text"

check on close present mail send dialog.

No need for lotus script, unless you want to do other fancy things :)
Avatar of KDrago

ASKER

Hi marilyng -

Thanks for your response.  I have already developed most of this using lotusscript.  I am building the body field of a memo using field append text.  I am now trying to get the history appended to the end of the body field.  I have a handle on the open email.  I copy the entire uidoc using uidoc.select all and uidoc.copy.  Now I want to position and paste it to the end of the body field I have been formatting.  Is there anyway to do this?


Thanks again for your time.

Kim
Avatar of KDrago

ASKER

oh I should add I have uidoc.paste in my code after all of my body field text is entered.  It is placing the paste in a completely different field altogether.  I just don't know how to position the cursor to where I need it to paste
ASKER CERTIFIED SOLUTION
Avatar of marilyng
marilyng

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KDrago

ASKER

marilyng,

Thank you so much for your time and response.  This worked great.  if I could give you more than the 500 I would!

Avatar of KDrago

ASKER

I should also add that your explanations were so helpful and thorough.  Big help to a Lotus newbie like me.  I really can't say enough!
You're welcome!