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: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: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
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: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: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