Submit form as email, NOT email attachment - InfoPath Dev
in

InfoPath Dev

Submit form as email, NOT email attachment

Last post 11-02-2009 02:56 AM by matjan. 16 replies.
Page 1 of 2 (17 items) 1 2 Next >
Sort Posts: Previous Next
  • 07-11-2007 08:58 AM

    Submit form as email, NOT email attachment

    I've created a form that I'd like the end user to submit to a shared mailbox.  However, I don't want it to send as an email attachment.  I need to be able to view the form in the Outlook preview pane, rather than having to manually open the attachment.

    Any ideas? 

    Thanks!
    Jennifer

  • 07-11-2007 03:37 PM In reply to

    Re: Submit form as email, NOT email attachment

    Hey Jennifer, Welcome to the forums.

    If you have InfoPath2007 there is an option to control this behavior.  I am guessing you have InfoPath 2003 or you would have probably seen this. In InfoPath 2003 the only way is to use the send to menu in InfoPath. Submitting to email whether with code or rule only does the attachment in 2003.

    If you have a significant form solution you are looking at, we have a catalog style form which gives you the "Outlook" style view of all your assigned forms. It has assignments and work flow built in as well as security and search, etc.  It utilizes the database accelerator web services and is included as a sample.  You can contact me directly if you would like to see a demo of the latest version.

    Qdabra Database Accelerator Suite Version 2.0 - Developer

    Filed under:
  • 07-11-2007 10:48 PM In reply to

    Re: Submit form as email, NOT email attachment

    Hi, you can use this bit of code to send the form in the body of an email and not as an attachment. even user who havn't infopath installed can view it: var mail = Application.ActiveWindow.MailEnvelope; mail.Subject = "MY Subject Text"; mail.Visible = true;
    Listen to Motörhead cos they play Rock'n Roll :)
  • 10-01-2007 11:32 AM In reply to

    Re: Submit form as email, NOT email attachment

    I'm a newbie at coding. Would this be entered in MSE under the OnSubmit button? Also, what needs to replace the underlined text below if my subject line is populated by a specific field on the form?

     mail.Subject = "MY Subject Text";

    Thanks.

    Heath

  • 12-20-2007 09:34 AM In reply to

    Re: Submit form as email, NOT email attachment

    Can this be used with Infopath 2003 ?

    Looks neat - how do I achieve this?

    Cheers

    Bob

    Cheers
    Bob
  • 04-03-2008 03:35 PM In reply to

    Re: Submit form as email, NOT email attachment

    I know nothing about coding in Infopath.  Is there a way I can create an HTML form submission and convert it to something Infopath can use?  All I really want to do is submit the form fields either in plain text or embedded within outlook.  With no coding skills, not sure how I can accomplish this.

  • 04-03-2008 03:41 PM In reply to

    Re: Submit form as email, NOT email attachment

    Hi and welcome to the forum.

    You probably need to give me a bit more details.

    What are you starting with and what do you want to end up with?

    You want to fill out a web form and then submit it via email to others?

    Do you need to store this data in a database? Do you need to pull dat from a database?

    You can have InfoPath XML documents hosted in a browser with MOSS 2007.

    You can email a link or an attachment (attachment does not do a lot of good if they have to open it in a browser)

    You can also connect to external datasources or submit the forms to web services or web servers for storage or processing.

  • 04-03-2008 03:52 PM In reply to

    Re: Submit form as email, NOT email attachment

    I have a form already setup to to submit to a sharepoint library location and it works with no problem. 

    Within the form are check box options.  I want to setup a submit option for one of the check boxes to email a plain text or embeded version of the form over outlook.  This is necessary because the recipient doesn't have InfoPath viewing capabilities.  The coding sounded like a good idea but it looks but i don't know it well enough to stumble my way through it.

  • 04-03-2008 04:03 PM In reply to

    Re: Submit form as email, NOT email attachment

    You can send the "view" via email in InfoPath 2007. However if they do not have InfoPath they will not be able to really view the form or update the data.

    You can attach the XML but there is not much they can do with it in the raw state.

    Another option is InfoPath form services so people without InfoPath can view the form in a browser.

  • 04-04-2008 06:37 AM In reply to

    • Albert
    • Top 500 Contributor
    • Joined on 04-03-2008
    • The Netherlands
    • Posts 32

    Re: Submit form as email, NOT email attachment

    Like nukkumatti said there is an option to send the current view in an email with InfoPath 2003 using code/mailenvelop.
     
    Example jscript code:
     
    function OpenMailEnvelop(subject, to)
    {
        try
        {
      var oEnvelope = Application.ActiveWindow.MailEnvelope;
     
      oEnvelope.Subject = subject;
      oEnvelope.To = to;
      oEnvelope.Visible = true;
     
            return true;
        }
        catch(exception)
        {
            return false;
        }
    }
    function btnSomeButton::OnClick(eventObj)
    {
      OpenMailEnvelop("this is the subject", "[email protected]")
    }
     
    It actually opens a 'mailenvelop-bar', so it requires user interaction.
     
    I don't have ip 2003 installed here, so i can't test.
     
    Albert
  • 04-04-2008 08:21 AM In reply to

    Re: Submit form as email, NOT email attachment

    This worked!  Thanks much!!  I was even able to identify some errors in how I applied the code and resolve them.  Thanks again!

  • 05-04-2008 07:20 PM In reply to

    Re: Submit form as email, NOT email attachment

    Is it possible to link this line to datasources in the form?  for the subject i'd like to add a concat expression and for to, i'd like to link it to another data field in the form. 

    OpenMailEnvelop("this is the subject", "[email protected]")

  • 10-22-2008 05:59 AM In reply to

    Re: Submit form as email, NOT email attachment

    Hi Ebonymb

    I am very interested in how you got this to work.  Where did you put the code and which bits needed changing

    Any help greatly appreciated

  • 10-29-2008 04:23 PM In reply to

    Re: Submit form as email, NOT email attachment

    Thank-you Albert and nukkumatti for the explanations that you both provided for the InfoPath 2003 workaround .   I have been able to use the Application.ActiveWindow.MailEnvelope function to construct an email with the active view similar to the way that InfoPath 2007 acts.  http://msdn.microsoft.com/en-us/library/aa167754(office.11).aspx

    My question is: Can I send the form in "Read-Only Snapshot" just exactly like I can in Infopath 2007?   As your example works now, the form's template remains as an attachment which would allow the form to be "Editable".  Unfortunately, this has the side-effect of causing most recipients to have to click on on a security warning before they are allowed to read the message content.  I'm also afraid that some companies might block messages that include the XML "code". 

    I was at a dead-end trying to get the EmailAdapter object http://msdn.microsoft.com/en-us/library/aa167746(office.11).aspx  working properly for the non-Office 2007 users.

    Thanks again for your help, 

    -Marco

     

  • 04-08-2009 10:45 AM In reply to

    Re: Submit form as email, NOT email attachment

    I am working on infoPath 2007 and trying to send view  via email in InfoPath 2007. Can you please tell how to do that ? Thanks in advance.

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