InfoPath form on Submit! Open as an Outlook email Message - InfoPath Dev
in

InfoPath Dev

InfoPath form on Submit! Open as an Outlook email Message

Last post 03-27-2013 05:59 AM by HHearle. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-21-2013 01:28 PM

    • yaseen
    • Not Ranked
    • Joined on 02-21-2013
    • Posts 2

    InfoPath form on Submit! Open as an Outlook email Message

    Hi,

     To be short, I want to design the same functionality like we used too have it in InfoPath form template (Asset Tracking form). When you click the "Send as an Email " Button the form will be in preview mode inside the Email Message Body. It is done JScript and the later Version doesnt support these scripts. I'm actually able open up an empty Email Message But I dont know how to display the specific field from the form or to show the url of the form.

    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);

    I got the above code from this forum. So how do I bring the form field to display in the body(?????) of the Message.

     Either I want the Preview of the form like we had it in Asset Tracking or I want to just display like Specific form fields to be displayed inside Body of the email Message.

    Regards,

    Yaseen

    I went through so many forums. I couldnt find anything. I would really appreciate your help.

    I work out of the box but Im not good at programming.

  • 02-24-2013 12:47 PM In reply to

    Re: InfoPath form on Submit! Open as an Outlook email Message

    Hi Yaseen,

    InfoPath forms (both filler and browser) can send views in email without any code. For the filler, just add a submit data connection for email and walk through the dialog. For the browser, you'll need to configure outgoing emails for your SharePoint site.

    To change the email body, etc. progammatically, you can write code. You need to create a data adapter to do the submit first and then set the fields. I'm guessing there are numerous examples on the web, but you'll need to search for something.

    Anyway, I wouldn't write code. Just switch your view before you submit and create the data on the view that you want to be in the email.

    Best of luck,

    Patrick Halstead
    Project Manager at Qdabra
  • 02-25-2013 10:42 AM In reply to

    • yaseen
    • Not Ranked
    • Joined on 02-21-2013
    • Posts 2

    Re: InfoPath form on Submit! Open as an Outlook email Message

    Thanks Patrick,

    But I want to edit the email before sending it. The out of box features doesnt let you to edit the email. But so far I couldnt find any codes related to this specific task. Im not a programmer either. I appreciate your help.

     

     

    Thanks

    Yaseen

  • 03-27-2013 05:59 AM In reply to

    Re: InfoPath form on Submit! Open as an Outlook email Message

    Maybe I'm missing the point, but couldn't you just use the toolbar button in InfoPath?

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.