Email subject field help

N

NCB737

Hello all, I am new to Infopath and have a slight problem with my form and
hope you can help.

I have a form with a 'submit' button and I would like to generate an email
from the button. I would like to add the contents of a field from the form
into the email subject field, which I can do using the 'submit using a data
connection'. The problem is, I still want the user to be able to edit the
body of the email and the 'to' field. I have the following code so far:

function submit1::eek:nclick(eventobj)
{
var objsubmit;

objsubmit = application.activewindow.mailenvelope;
objsubmit.to = "";
objsubmit.subject = getnode("/my:myfields/my:entno").text;
objsubmit.visible = true;
objsubmit = null;
}

OR The preferred fuction

function submit1::eek:nclick(eventobj)
{
xdocument.ui.showmailitem("to (want to leave blank)", "", "", "Subject:" +
(text from a control on my form), "email body");
}

Many thanks in advance.

NCB737
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top