InfoPath form on Submit! Open as an Outlook email Message using C#
-
Hi, I want to send the current infopath as an email message. So that I can edit the email message body and send email to receipients. Code: on Click Microsoft.Office.Interop.Outlook. Application oApplication = new Microsoft.Office.Interop.Outlook.Application(); Microsoft.Office.Interop.Outlook. MailItem newMail = (Microsoft.Office.Interop.Outlook.MailItem)oApplication.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem); newMail.To =""; newMail.Subject =""; newMail.Body = "?????"; newMail.Display(false); The above code opens up Outlook Email Message but I want the current infopath form in body of the message. Im not a coder, I appreciate if someone can point me in the right direction. The OOTB Option do send email but we want to able edit the email before sending. So we need to hard code. Thanks Yaseen
-
Hi, I want to send the current infopath as an email message. So that I can edit the email message body and send email to receipients. Code: on Click Microsoft.Office.Interop.Outlook. Application oApplication = new Microsoft.Office.Interop.Outlook.Application(); Microsoft.Office.Interop.Outlook. MailItem newMail = (Microsoft.Office.Interop.Outlook.MailItem)oApplication.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem); newMail.To =""; newMail.Subject =""; newMail.Body = "?????"; newMail.Display(false); The above code opens up Outlook Email Message but I want the current infopath form in body of the message. Im not a coder, I appreciate if someone can point me in the right direction. The OOTB Option do send email but we want to able edit the email before sending. So we need to hard code. Thanks Yaseen
I only know how to send the formular as attachment. Therefore you have to setup a new Connection "Data"-Tab in InfoPath -> sent Formular -> To E-Mail (they may be called differently I just got the German version). You can setup options there (for example your own C# Code). Then use the connection for a button and you can sent the an eMail. I can't help you any further because I didn't had that case yet.
------------------------------ Author of Primary ROleplaying SysTem How do I take my coffee? Black as midnight on a moonless night. War doesn't determine who's right. War determines who's left.