<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Email subject field help</title><link>https://www.infopathdev.com:443/forums/thread/40109.aspx</link><pubDate>Mon, 30 Mar 2009 04:42:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40109</guid><dc:creator>swathip</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40109.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=40109</wfw:commentRss><description>&lt;p&gt;Hi and welcome to Forums,&lt;/p&gt;
&lt;p&gt;You can add an editable field on the form to enter the To value. Do the same for the body also. Use these fields in code same as Subject field. But the user cannot modify the To or any value while sending the Email.&lt;/p&gt;</description></item><item><title>Email subject field help</title><link>https://www.infopathdev.com:443/forums/thread/40107.aspx</link><pubDate>Sun, 29 Mar 2009 16:05:01 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40107</guid><dc:creator>NCB737</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40107.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=40107</wfw:commentRss><description>&lt;font size="2" face="Verdana, Arial, Helvetica"&gt;Hello all, I am new to Infopath and have a slight problem with my form and  
&lt;br /&gt;
hope you can help. 
&lt;br /&gt;
 
&lt;br /&gt;
I have a form with a &amp;#39;submit&amp;#39; button and I would like to generate an email  
&lt;br /&gt;
from the button. I would like to add the contents of a field from the form  
&lt;br /&gt;
into the email subject field, which I can do using the &amp;#39;submit using a data  
&lt;br /&gt;
connection&amp;#39;. The problem is, I still want the user to be able to edit the  
&lt;br /&gt;
body of the email and the &amp;#39;to&amp;#39; field. I have the following code so far: 
&lt;br /&gt;
 
&lt;br /&gt;
function submit1::onclick(eventobj) 
&lt;br /&gt;
{ 
&lt;br /&gt;
var objsubmit; 
&lt;br /&gt;
 
&lt;br /&gt;
objsubmit = application.activewindow.mailenvelope; 
&lt;br /&gt;
objsubmit.to = &amp;quot;&amp;quot;; 
&lt;br /&gt;
objsubmit.subject = getnode(&amp;quot;/my:myfields/my:entno&amp;quot;).text; 
&lt;br /&gt;
objsubmit.visible = true; 
&lt;br /&gt;
objsubmit = null; 
&lt;br /&gt;
} 
&lt;br /&gt;
 
&lt;br /&gt;
OR The preferred fuction 
&lt;br /&gt;
 
&lt;br /&gt;
function submit1::onclick(eventobj) 
&lt;br /&gt;
{ 
&lt;br /&gt;
xdocument.ui.showmailitem(&amp;quot;to (want to leave blank)&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;Subject:&amp;quot; +  
&lt;br /&gt;
(text from a control on my form), &amp;quot;email body&amp;quot;); 
&lt;br /&gt;
} 
&lt;br /&gt;
 
&lt;br /&gt;
Many thanks in advance. &lt;/font&gt;</description></item></channel></rss>