Excel.Tips.Net Welcome toExcel.Tips.Net

Helpful Links

Tips.Net Home
ExcelTips Home
Ask an Excel Question
Make a Comment

Tips.Net Store

ExcelTips FAQ
ExcelTips Premium

Learn Access Now
Free Printable Forms

Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips

Advertise on the
ExcelTips Site

Newest Tips

Recording a Macro

Adding a Little Animation to Your Life

Converting a Range of URLs to Hyperlinks

Making the Formula Bar Persistent

Engineering Calculations

Digital Signatures for Macros

Fixing the Decimal Point

 

Automatic Text in an E-mail

Summary: When creating an e-mail address hyperlink using the Insert Hyperlink dialog box, Excel allows you to enter a subject for the message to be created by the link. If you want to also specify some body text, you need to use the techniques described in this tip. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, Excel 2003, and Excel 2007.)

Laura has an e-mail address that is a hyperlink in Excel. She edited the hyperlink so that the e-mail created when the link is clicked has a subject line. She wants to be able to have the e-mail automatically contain text, as well.

There is a way to do this rather easily in Excel. To see the way to do it, put the address of the e-mail recipient in A1, the desired message subject in A2, and the desired message body text in A3. Then, in a different cell, use this formula:

=HYPERLINK("mailto:" & A1 & "?subject="
& A2 & "&body=" & A3, "Linking text")

This results in a hyperlink that users can click and have both the subject and body filled in. The downside to this is that your message body can't be terribly long. The total length permissible for any hyperlink is 255 characters, including the words such as "mailto," "subject," and "body." Thus, if the length of the address in cell A1 is 16 characters, the length of the subject in cell A2 is 25 characters, and the "overhead" ("mailto," "subject," etc.) take 22, then that means your message in cell A3 cannot be over 192 characters. (That's a relatively short message.)

You can also create the appropriate hyperlink using the Insert Hyperlink dialog box. Follow these steps:

  1. Display the Insert Hyperlink dialog box. (Choose Insert | Hyperlink or, in Excel 2007, display the Insert tab of the ribbon and click the Hyperlink tool.)
  2. Make sure the E-mail Address option is chosen in the Link To area. (Click here to see a related figure.)
  3. In the Text to Display field, enter the text you want to appear in the worksheet.
  4. In the E-mail Address field, enter the address to be used in the link.
  5. In the Subject field, enter the text you want used for the subject line.
  6. Immediately after the subject text (in the Subject field), type an ampersand and the word "body" followed by an equal sign (as in "&body=" without the quote marks).
  7. Continue typing your desired body text, after the equal sign.
  8. Click on OK.

You should note that this approach will work for most mail clients. If it doesn't work for yours, then try replacing the spaces in the subject and the body with the characters %20.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3859) applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003 | 2007

Remove Some Stress at Tax Time! Doing your personal income taxes can be a royal pain. Why not make the process just a bit less stressful with our 101-question checklist. You can prepare for filing your taxes with confidence, knowing you've covered all your bases.
 
Check out Filing Your Income Taxes Checklist today!