<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Email Attachment help please</title><link>https://www.infopathdev.com:443/forums/thread/57048.aspx</link><pubDate>Sat, 17 Jul 2010 12:58:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:57048</guid><dc:creator>Skarn</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/57048.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=57048</wfw:commentRss><description>&lt;p&gt;Only speaking from Infopath 2003 point of view - but you could try just having an attachment field and let the infopath form itself be the attachment and use a normal email data adapter/secondary connection.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If you need a code solution - in order to set the Outlook mail object&amp;#39;s attachment property you may have to create a proper Outlook application object reference. I don&amp;#39;t think the default Infopath code model allows you to reference and attach other files using the &amp;#39;SendMail&amp;#39; function.&lt;/p&gt;</description></item><item><title>Re: Email Attachment help please</title><link>https://www.infopathdev.com:443/forums/thread/56787.aspx</link><pubDate>Tue, 13 Jul 2010 07:02:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:56787</guid><dc:creator>Namrata</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/56787.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=56787</wfw:commentRss><description>&lt;p&gt;Hi Patrick, i&amp;#39;m trying to send an excel file as attachment but i&amp;#39;m unable to set &amp;quot;AttachmentFileName&amp;quot; to my file&amp;#39;s path. it says it is read only.&lt;/p&gt;
&lt;p&gt;i&amp;#39;m using infopath 2007.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;please help. Urgent!!&lt;/p&gt;</description></item><item><title>Re: Email Attachment help please</title><link>https://www.infopathdev.com:443/forums/thread/15108.aspx</link><pubDate>Thu, 22 Feb 2007 20:12:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15108</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15108.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=15108</wfw:commentRss><description>Hi Trunzoc and welcome to our forum!&lt;br /&gt;&lt;br /&gt;To answer your questions:&lt;br /&gt;&lt;br /&gt;1. Yes, you can do this. Use the e-mail adapter and AttachmentFileName. Here's an example:&lt;br /&gt;    objEmailAdapter.AttachmentFileName = strName + "–" + strDate + ".xml"; &lt;br /&gt;BTW: this is documented in the InfoPath 2003 SDK, a great reference if you haven't downloaded it yet.&lt;br /&gt;&lt;br /&gt;2. To remove the attachment, just make the above string blank. &lt;br /&gt;&lt;br /&gt;Happy Trails!&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Email Attachment help please</title><link>https://www.infopathdev.com:443/forums/thread/15107.aspx</link><pubDate>Thu, 22 Feb 2007 19:47:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15107</guid><dc:creator>trunzoc</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15107.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=15107</wfw:commentRss><description>Unfortunately, that thread doesn't answer either question.&lt;br /&gt;&lt;br /&gt;Any other suggestions?&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Email Attachment help please</title><link>https://www.infopathdev.com:443/forums/thread/15106.aspx</link><pubDate>Fri, 16 Feb 2007 07:13:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:15106</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/15106.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=15106</wfw:commentRss><description>Hi Trunzoc,&lt;br /&gt;&lt;br /&gt;Check out this link,&lt;br /&gt;&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=3339&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=3339&lt;/a&gt;</description></item><item><title>Email Attachment help please</title><link>https://www.infopathdev.com:443/forums/thread/13060.aspx</link><pubDate>Thu, 15 Feb 2007 18:05:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13060</guid><dc:creator>trunzoc</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13060.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13060</wfw:commentRss><description>First off,  thanks for a great site!!  I've been lurking and gleaning info for quite some time.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I an using the included code to make a new Outlook message appear.  The reason I am doing it this way instead of with a data connection is because the person completing the form will need to edit the resulting email before it's sent.  The Email code works fine for 1 part of the submission process except the attachment name.  At a later stage, however, I need to get this email to be sent with no attachment at all.&lt;br /&gt;&lt;br /&gt;so the 2 questions are...&lt;br /&gt;&lt;br /&gt;1)  Is there any way to change the attachment name from "Form1.xml" to something dynamic based on form fields using the code I've included (or some other coding)?&lt;br /&gt;&lt;br /&gt;2)  Is there any way to get the same new, pre-filled email message to open except with no attachment at all?&lt;br /&gt;&lt;br /&gt;thanks in advance,&lt;br /&gt;Craig&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Function msoxd_my_editable_OnAfterChange(eventObj)&lt;br /&gt;&lt;br /&gt;' If the submit operation is successful, set&lt;br /&gt;' eventObj.ReturnStatus = True&lt;br /&gt;&lt;br /&gt;'Opens an email window with prefilled subject line and with form as xml attachment (no HTML version).&lt;br /&gt;On Error Resume Next&lt;br /&gt;&lt;br /&gt;Set oTo = XDocument.DOM.selectSingleNode("//my:myFields/my:StoredValues/my:MailSettings/my:to")&lt;br /&gt;Set oCC = XDocument.DOM.selectSingleNode("//my:myFields/my:StoredValues/my:MailSettings/my:cc")&lt;br /&gt;Set oBCC = XDocument.DOM.selectSingleNode("//my:myFields/my:StoredValues/my:MailSettings/my:bcc")&lt;br /&gt;Set oSubject = XDocument.DOM.selectSingleNode("//my:myFields/my:StoredValues/my:MailSettings/my:subject")&lt;br /&gt;Set oBody = XDocument.DOM.selectSingleNode("//my:myFields/my:StoredValues/my:MailSettings/my:body")&lt;br /&gt;&lt;br /&gt;formTo = oTo.text&lt;br /&gt;formCC = oCC.text&lt;br /&gt;formBCC = oBCC.text&lt;br /&gt;formSubj = oSubject.text&lt;br /&gt;formBody = oBody.text&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;XDocument.UI.ShowMailItem formTo, formCC, formBCC, formSubj, formBody&lt;br /&gt;eventObj.ReturnStatus = False&lt;br /&gt;Exit Function&lt;br /&gt;End Function</description></item></channel></rss>