<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9080.aspx</link><pubDate>Tue, 21 Mar 2006 13:58:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9080</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9080.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9080</wfw:commentRss><description>Ok that is really a nice solution.&lt;br /&gt;&lt;br /&gt;But I guess I won't have the time anymore to implement that cos I am almost at the end of my thesis time. So I found also a solution may be not as smart as yours :) but it works. May be I'll come back to you again when I start working on my next K2 project.&lt;br /&gt;Cheers</description></item><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9079.aspx</link><pubDate>Tue, 21 Mar 2006 13:46:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9079</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9079.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9079</wfw:commentRss><description>On the last K2 project I did I had a process that was using both InfoPath and Asp.Net and I needed a central place to store associated files.  I used K2's WSS webservices to create uniquely named folders dynically in WSS.  Then I created a central web service that both InfoPath and Asp.Net would call to upload files to that folder in WSS.  Then when the user opened a worklist item in either InfoPath or Asp.Net, I read the list of files from the folder in WSS and provided a link to the file.  This gave the appearance that the file was actually attached but the file was actually in WSS.</description></item><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9078.aspx</link><pubDate>Tue, 21 Mar 2006 06:43:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9078</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9078.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9078</wfw:commentRss><description>Hi aspa,&lt;br /&gt;&lt;br /&gt;yes I read this thread already about K2 and too big file attachments within InfoPath, therefor I use the code I posted here already to just send the attachments with a kind of notification mail which is not using the K2 workflow. Anyway I also found the solution for issue from yesterday.&lt;br /&gt;&lt;br /&gt;You can use this code in a button event to include the form as html within the e-mail body as well it is attached to the mail. Actually for me it would be enough to have it in the body, so if someone knows how to avoid the attachment while using this code please let me know.&lt;br /&gt;&lt;pre&gt;MailEnvelope myMail = thisXDocument.View.Window.MailEnvelope;&lt;br /&gt;			myMail.To = nodeOrgMail.text;&lt;br /&gt;			myMail.Subject = "Update information about running ARF Request";&lt;br /&gt;			myMail.Visible = true;&lt;/pre&gt;</description></item><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9077.aspx</link><pubDate>Mon, 20 Mar 2006 15:59:26 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9077</guid><dc:creator>vt_asparagus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9077.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9077</wfw:commentRss><description>When you say attach the InfoPath form itself are referring to the .xsn file?  Or the .xml file with instance data?&lt;br /&gt;&lt;br /&gt;Also, I noticed in your original thread that you want to allow the user to attach files to the InfoPath form.  From a K2 perspective that is NOT good practice.  Read this&lt;a target="_blank" href=http://forum.k2workflow.com/viewtopic.php?t=699&gt;http://forum.k2workflow.com/viewtopic.php?t=699&lt;/a&gt;  &lt;br /&gt;&lt;br /&gt;As well, if you are capturing files in your InfoPath form and then you want to extract them you will have to do some extra work.  Can provide you some code if you need it...</description></item><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9076.aspx</link><pubDate>Mon, 20 Mar 2006 11:36:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9076</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9076.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9076</wfw:commentRss><description>Hi I asked that already i this thread here but it just got lost somehow.&lt;br /&gt;Does someone know if I can attach the InfoPath form itself to an eMail programmatically ?&lt;br /&gt;&lt;br /&gt;Thx</description></item><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9075.aspx</link><pubDate>Mon, 20 Feb 2006 06:51:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9075</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9075.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9075</wfw:commentRss><description>Hi,&lt;br /&gt;&lt;br /&gt;oh yes I forgot to mention it. Sorry for that.&lt;br /&gt;You need to initialize it like that:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;private Microsoft.Office.Interop.InfoPath.SemiTrust.Application	thisApplication;&lt;/pre&gt;.&lt;br /&gt;&lt;br /&gt;same goes for "app" in the _Startup method.&lt;br /&gt;&lt;br /&gt;That should work I hope.&lt;br /&gt;&lt;br /&gt;Listen to Motörhead cos they play Rock'n Roll :)</description></item><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9074.aspx</link><pubDate>Thu, 16 Feb 2006 13:15:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9074</guid><dc:creator>Abhishek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9074.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9074</wfw:commentRss><description>Hi,&lt;br /&gt;    To use OpenFileDialog Class, we need to add the System.Windows.Forms.dll reference and the namespace.&lt;br /&gt;Now if I try to run,I get the error stating... &lt;br /&gt;'Application' is a ambiguous reference.&lt;br /&gt;Any help???&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Abhishek</description></item><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9073.aspx</link><pubDate>Wed, 15 Feb 2006 20:50:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9073</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9073.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9073</wfw:commentRss><description>You can send you form as an attachment by using a Email dataconnection. You can do this by just giving the attachment name to the email control. But I dont think we can send external files as attachments sent through the InfoPath Email adapter. Only thing you can do is send other files as part of your form, attached through a filecontrol.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;INFOPATHdev India</description></item><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9072.aspx</link><pubDate>Wed, 15 Feb 2006 12:54:47 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9072</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9072.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9072</wfw:commentRss><description>Ok,&lt;br /&gt;&lt;br /&gt;now I need some help. How is it or better is it possible to have submit button using data connection to send the form via eMail and in addition have some other attachments in the eMail. (The one I selected with the browse button from my file system) or the other way is it possible to programmatically attach the Infopath form to an eMail.&lt;br /&gt;&lt;br /&gt;Thx&lt;br /&gt;&lt;br /&gt;Listen to Motörhead cos they play Rock'n Roll :)</description></item><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9071.aspx</link><pubDate>Wed, 15 Feb 2006 05:09:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9071</guid><dc:creator>Abhishek</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9071.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9071</wfw:commentRss><description>Wow. Toooo good.&lt;br /&gt;Thanks a lot Nukkumatti.&lt;br /&gt;regards,&lt;br /&gt;Abhishek</description></item><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9070.aspx</link><pubDate>Tue, 14 Feb 2006 21:19:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9070</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9070.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9070</wfw:commentRss><description>Thanks posting the answer, this should be helpfull for many more people.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;INFOPATHdev India</description></item><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9069.aspx</link><pubDate>Tue, 14 Feb 2006 14:59:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9069</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9069.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9069</wfw:commentRss><description>Ok got it now,&lt;br /&gt;&lt;br /&gt;this &lt;pre&gt;objMail.From = "valid email address";&lt;/pre&gt;&lt;br /&gt;must be a valid eMail address and also the next line was missing,&lt;br /&gt;&lt;br /&gt;objMail.Attachments.Add(mailAtt);&lt;br /&gt;&lt;br /&gt;That's it. Maybe someone wants to do the same. Hope this can help then.&lt;br /&gt;&lt;br /&gt;Listen to Motörhead cos they play Rock'n Roll :)</description></item><item><title>Re: Attachments</title><link>https://www.infopathdev.com:443/forums/thread/9068.aspx</link><pubDate>Tue, 14 Feb 2006 12:55:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9068</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9068.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9068</wfw:commentRss><description>Hi all,&lt;br /&gt;&lt;br /&gt;kind of answering my on post. I think I am on the right track.&lt;br /&gt;This is what I have so far:&lt;br /&gt;One button with the functionality to browse your local file system (code below):&lt;br /&gt;&lt;pre&gt;[InfoPathEventHandler(MatchPath="CTRL1_5", EventType=InfoPathEventType.OnClick)]&lt;br /&gt;		public void CTRL1_5_OnClick(DocActionEvent e)&lt;br /&gt;		{&lt;br /&gt;			IXMLDOMNode nodeText = thisXDocument.DOM.selectSingleNode("my:myFields/my:field1");&lt;br /&gt;			// Write your code here.&lt;br /&gt;			OpenFileDialog ofdlg = new OpenFileDialog(); &lt;br /&gt;			ofdlg.InitialDirectory = @"c:\" ; &lt;br /&gt;			ofdlg.Filter = "All files (*.*)|*.*|All files (*.*)|*.*" ; &lt;br /&gt;			ofdlg.FilterIndex = 2 ; &lt;br /&gt;			ofdlg.RestoreDirectory = true ; &lt;br /&gt;			if(ofdlg.ShowDialog() == DialogResult.OK) &lt;br /&gt;			{ &lt;br /&gt;				nodeText.text = ofdlg.FileName ; &lt;br /&gt;			} &lt;br /&gt;		}&lt;/pre&gt;&lt;br /&gt;One textbox where the filename is entered.&lt;br /&gt;&lt;br /&gt;One button to send the email, but its not working yet.&lt;br /&gt;Some error like access to CDO object failed (code below):&lt;br /&gt;&lt;pre&gt;[InfoPathEventHandler(MatchPath="CTRL3_5", EventType=InfoPathEventType.OnClick)]&lt;br /&gt;		public void CTRL3_5_OnClick(DocActionEvent e)&lt;br /&gt;		{&lt;br /&gt;			// Write your code here.&lt;br /&gt;			IXMLDOMNode nodeText = thisXDocument.DOM.selectSingleNode("my:myFields/my:field1");&lt;br /&gt;			MailMessage objMail = new MailMessage();&lt;br /&gt;			objMail.BodyFormat = MailFormat.Html;&lt;br /&gt;			objMail.From = "name";&lt;br /&gt;			objMail.To	= "address";&lt;br /&gt;			objMail.Subject = " text";&lt;br /&gt;			objMail.Body = "text";&lt;br /&gt;			MailAttachment mailAtt = new MailAttachment(nodeText.text);&lt;br /&gt;&lt;br /&gt;			try&lt;br /&gt;			{&lt;br /&gt;				SmtpMail.SmtpServer = "IP";&lt;br /&gt;				SmtpMail.Send(objMail);&lt;br /&gt;			}&lt;br /&gt;			catch(Exception ex)&lt;br /&gt;			{&lt;br /&gt;				MessageBox.Show(ex.Message);&lt;br /&gt;			}&lt;br /&gt;		}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Listen to Motörhead cos they play Rock'n Roll :)</description></item><item><title>Attachments</title><link>https://www.infopathdev.com:443/forums/thread/5356.aspx</link><pubDate>Tue, 14 Feb 2006 08:36:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5356</guid><dc:creator>nukkumatti</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5356.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5356</wfw:commentRss><description>Hi all,&lt;br /&gt;&lt;br /&gt;in my situation it is really not recommended to attach the required files to the InfoPath document. I would rather like to have a browse button in my document with which I can browse my hard drive, select the required files and then send them via email to the next user (or save them to a server). After submission the Infopath document it self then starts a new K2 workflow. That is actually the reason why the attachments within the form are not doable. I am using managed code. Does someone has a good idea or a best practice for that ?&lt;br /&gt;&lt;br /&gt;Thx&lt;br /&gt;&lt;br /&gt;Listen to Motörhead cos they play Rock'n Roll :)</description></item></channel></rss>