Link to home
Start Free TrialLog in
Avatar of bsharath
bsharathFlag for India

asked on

When i click the NEW button on the outlook 2007 i need a predefined data to be inserted into the body of the new mail.

Hi,

When i click the NEW button on the outlook 2007 i need a predefined data to be inserted into the body of the new mail.
in the body i need this data

Hi,

Somedata

Regards
Sharath

I want the above data to be inserted into the body when clicked New mail.

Regards
sharath
Avatar of MrLonandB
MrLonandB

Well, one way you might be able to do it, is to create a "Signature" with that information in it.
Disregard my past post...I didn't pay attention to the greeting and the signature would not be properly formatted for that. Let me look at something else and get back to you.
Avatar of bsharath

ASKER

Ya but i want it to come when clicked the new button and a lot of other data as the body of the mail and just not the signature
Avatar of David Lee
Hi, Sharath.

It's possible to do this, but I see the potential for problems.  The solution is to use code that monitors for new windows opening in Outlook.  When the code sees one it would check to see if the windows contains a message.  If it does, then it would try to determine if it's a new message.  I say "try" because there's no definite test for that.  If the messages appears to be new, then the script can insert the information you want.  The danger is that the code may not be able to distinguish between a new message and an unsent message that's been saved to drafts.  If it can't then the result would be that the script would erase the body of the draft when it inserted your information.  

I think there are three approaches that will achieve the same results with much less effort and no danger.

1.  Create a separate toolbar button that creates new messages with your information filled in.
2.  Use stationery.  Stationery kind be used like a template.  When you wanted a message with this information filled in, then you'd create a new message using this stationery.
3.  Use a template.  Template are pre-formatted messages.  
ok..

2. Will this create a predefined body. when clicked the NEW button
ok..

2. Will this create a predefined body. when clicked the NEW button
Yes, if that stationery is set to be the default.
Ok Can i have the steps for this please...
1.  Create the stationery.  Stationery is nothing more than an HTML file.  You can create it using Notepad, Word, FrontPage, any tool that can output an HTML file.  I've included a simple version of the HTML below.

2.  Place the HTML file in the folder C:\Users\<username>\AppData\Roaming\Microsoft\Stationery\

3.  Set Outlook to use this stationery as its default.  Click Tools > Options.  Select the Mail Format tab.  Click the Stationery and Fonts button.  Click the Theme button.  Select your stationery.
<p>Hi,</p>
<p>Somedata</p>
<p>Regards<br>Sharath</p>

Open in new window

David i did all as you said..

Set Outlook to use this stationery as its default.  Click Tools > Options.  Select the Mail Format tab.  Click the Stationery and Fonts button.  Click the Theme button.  Select your stationery.
>> I cannot see the name that i saved in the folder called stationerary in the C drive
David i did all as you said..

Set Outlook to use this stationery as its default.  Click Tools > Options.  Select the Mail Format tab.  Click the Stationery and Fonts button.  Click the Theme button.  Select your stationery.
>> I cannot see the name that i saved in the folder called stationerary in the C drive
Does the file name end with .htm?  If not, then that's the problem.
The concept is right but i get this

<p>Hi,</p>
<p>Somedata</p>
<p>Regards<br>Sharath</p>

I have saved the file as
new.htm
The concept is right but i get this

<p>Hi,</p>
<p>Somedata</p>
<p>Regards<br>Sharath</p>

I have saved the file as
new.htm
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

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
Cool!  I posted to these other two questions.