How to remove attachments of outlook mail message while using "XDocument.UI.ShowMailItem" method - InfoPath Dev
in

InfoPath Dev

How to remove attachments of outlook mail message while using "XDocument.UI.ShowMailItem" method

Last post 01-26-2009 08:02 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-23-2009 06:35 AM

    How to remove attachments of outlook mail message while using "XDocument.UI.ShowMailItem" method

    Hi All,

    I am designing an InfoPath 2003 form & writing code in Javascript. I have a button on form to send a mail to users with some of the form nodes.

    I am using "XDocument.UI.ShowMailItem" method  to send mail code part. This method sending form as attachment in outlook. That is fine with me.

    But i observed this method attaching all the attachments in the form to email message. I really need no attachments or only infopath form as attachment, i dont want the files attached to the form.

     Any one can help me please to remove all the attachment of outlook email message

    // Javascript code using for Sample Email 

    XDocument.UI.ShowMailItem("gaumrb", "", "", "Updated Form", "Here is the updated form that you requested.");

    Please Reply me ASAP...

    Thanks

    BMK
  • 01-26-2009 08:02 AM In reply to

    Re: How to remove attachments of outlook mail message while using "XDocument.UI.ShowMailItem" method

    I'm not sure of a way to specify sending the form without the attached files, but I would think you could, in code, create variables to hold the contents of the nodes w/ the file attachments, set those variables to the values of the file attachment nodes, set the file attachment nodes to blank, send the email, then reset the file attachment nodes to the variables you were using to hold the attachments.

    Of course, you'd want to use proper error handling, to ensure that you didn't end up losing those file attachments!

    Hilary Stoupa

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