Automatic Text in an E-mail

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 tab of the ribbon.
  2. Click the Hyperlink tool. Excel displays the Insert Hyperlink dialog box.
  3. Make sure the E-mail Address option is chosen in the Link To area. (See Figure 1.)
  4. Figure 1. The Insert Hyperlink dialog box.

  5. In the Text to Display field, enter the text you want to appear in the worksheet.
  6. In the E-mail Address field, enter the address to be used in the link.
  7. In the Subject field, enter the text you want used for the subject line.
  8. 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).
  9. Continue typing your desired body text, after the equal sign.
  10. 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.