Insert a hyperlink that opens a new e-mail message

When designing a Microsoft Office InfoPath 2003 form, you can insert a hyperlink control that opens a new e-mail message when clicked by your users. This is referred to as a mailto hyperlink. You can specify the recipient and subject when you insert the hyperlink control, or you can have the recipient and subject determined by information stored in the form's data source (data source: The collection of fields and groups that define and store the data for an InfoPath form. Controls in the form are bound to the fields and groups in the data source.).

 Note   If you use the data source to determine the recipient and subject of the e-mail message, the hyperlink control must be bound (bind: To connect a control to a field or group in the data source so that data entered into the control is saved. When a control is unbound, it is not connected to a field or group, and so data entered into the control will not be saved.) to a specific field (field: An element or attribute in the data source that can contain data. If the field is an element, it can contain attribute fields. Fields store the data that is entered into controls.) or fields in the data source.

ShowCreate a mailto hyperlink (specify the recipient and subject)

  1. In design mode, place the insertion point where you want to insert the hyperlink.
  2. On the Standard toolbar, click Insert Hyperlink Button image.
  3. In the Insert Hyperlink dialog box, click the General tab.
  4. Under Link to, click Address.
  5. In the Address box, type mailto:someone@example.com?subject=My Subject, replacing the address and subject with the information you want.
  6. Under Display, click Text, and then type the text you want displayed for the hyperlink in the Text box.

ShowCreate a mailto hyperlink (use the data source to determine the recipient and subject)

  1. In design mode, place the insertion point where you want to insert the hyperlink.
  2. On the Standard toolbar, click Insert Hyperlink Button image.
  3. In the Insert Hyperlink dialog box, click the General tab, and then under Link to, click Data source.
  4. Click Select XPath Button image.
  5. In the Select a Field or Group dialog box, select the field you want to use for the recipient of the e-mail message, and then click OK.
  6. In the Data source box under Link to, select the XPath expression, and then copy and paste it into a text editor such as Microsoft Notepad.
  7. Place the insertion point at the front of the expression, and then type concat( "mailto: ",
  8. Place the insertion point at the end the expression, and then type , "?subject=",
  9. Under Link to in the Insert Hyperlink dialog box, click Select XPath Button image again.
  10. In the Select a Field or Group dialog box, select the field you want to use for the subject of the e-mail message, and then click OK.
  11. In the Data Source box under Link to, select the new XPath expression, copy and paste it into the text editor after the existing expression text, and then type ) at the end of the expression.
  12. Copy the entire expression, and then paste it into the Data source box under Link to.
  13. Under Display, click Data source, click Select XPath Button image, and then, in the Select a Field or Group dialog box, select the field or group the control is bound to.
 
 
Applies to:
InfoPath 2003