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.
Note If you use the data source to determine the recipient and subject of the e-mail message, the hyperlink control must be bound to a specific field or fields in the data source.
Create a mailto hyperlink (specify the recipient and subject)
- In design mode, place the insertion point where you want to insert the hyperlink.
- On the Standard toolbar, click Insert Hyperlink .
- In the Insert Hyperlink dialog box, click the General tab.
- Under Link to, click Address.
- In the Address box, type mailto:[email protected]?subject=My Subject, replacing the address and subject with the information you want.
- Under Display, click Text, and then type the text you want displayed for the hyperlink in the Text box.
Create a mailto hyperlink (use the data source to determine the recipient and subject)
- In design mode, place the insertion point where you want to insert the hyperlink.
- On the Standard toolbar, click Insert Hyperlink .
- In the Insert Hyperlink dialog box, click the General tab, and then under Link to, click Data source.
- Click Select XPath .
- 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.
- 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.
- Place the insertion point at the front of the expression, and then type concat( "mailto: ",
- Place the insertion point at the end the expression, and then type , "?subject=",
- Under Link to in the Insert Hyperlink dialog box, click Select XPath again.
- 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.
- 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.
- Copy the entire expression, and then paste it into the Data source box under Link to.
- Under Display, click Data source, click Select XPath , and then, in the Select a Field or Group dialog box, select the field or group the control is bound to.