Set Properties in emails by code - InfoPath Dev
in

InfoPath Dev

Set Properties in emails by code

Last post 01-26-2007 12:25 PM by Patrick Halstead. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 01-25-2007 02:35 AM

    • zaphi
    • Top 150 Contributor
    • Joined on 01-09-2006
    • Switzerland
    • Posts 82

    Set Properties in emails by code

    Hi
    For two months I introduced an InfoPath form as purchase demand in my company, which must be signed through several people. Those people become the link of the form in an email, which is produced programmically of InfoPath with the EmailAdapter object.

    Now I notice that some people don't treat the forms quickly enough. To solve this problem, I would like to meet following requirements (Outlook):

    1. Set the importance of the message to "High"
    2. Set the date of the flag "Follow Up" to remind the addressee automatically

    I wonder if anybody can help me, to solve it by code (JScript)

    Thanks a lot
    Best regards.
    Philippe
    Infopath 2007/SP2
  • 01-25-2007 06:14 PM In reply to

    Re: Set Properties in emails by code

    Hi Philippe,
    Do you have any code in the form? If you are familiar with .NET coding, you should be able to specify the e-mail envelope properties using code. You may have to search around MSDN for the right property. Let us know what you get working. I really like the automatically set Follow-Up reminder. That's a good idea.
    Patrick Halstead
    Project Manager at Qdabra
  • 01-26-2007 02:07 AM In reply to

    • zaphi
    • Top 150 Contributor
    • Joined on 01-09-2006
    • Switzerland
    • Posts 82

    Re: Set Properties in emails by code

    Hi Patrick
    Thanks for your reply.
    Here an extract of the code I use (JScript) in my form:
    {
    ...
    var oEmail = XDocument.DataAdapters[datenverbindung];
    oEmail.Intro = "Dieses Mail wurde von InfoPath generiert. Bitte auf den folgenden Link anklicken, um das Formular zu öffnen und zu bearbeiten:\nLINK: " + XDocument.URI;
    //I should define here the importance High
    //I should define here the date for follow up reminder
    oEmail.Submit();
    ...
    }
    properties To and Subject are defined in the data connection.

    I wonder if I can use .NET coding in JScript.
    I have searched in MSDN, but haven't found anything I need.

    Philippe
    Infopath 2007/SP2
  • 01-26-2007 10:55 AM In reply to

    Re: Set Properties in emails by code

    Hi again Philippe,
    You can't mix JScript and .NET. I'm sorry, but I haven't done what you are trying to do before. I'm going to ask Shiraz - he worked on InfoPath integration with Outlook during his last job at Microsoft. Stay tuned ...
    Patrick Halstead
    Project Manager at Qdabra
  • 01-26-2007 12:19 PM In reply to

    Re: Set Properties in emails by code

    Unfortunately, the InfoPath integration with Outlook does not allow this detailed level of mail message parameter setting. It's a very good point and I'll pass along the feedback to my friends in the InfoPath team.

    At this point you'll have to do it via code completely. I'm not sure if you can get at the OLK object model from script.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 01-26-2007 12:25 PM In reply to

    Re: Set Properties in emails by code

    OLK=Outlook
    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.