mail sending in vb code - InfoPath Dev
in

InfoPath Dev

mail sending in vb code

Last post 01-22-2007 08:51 PM by Matt Faus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-19-2007 10:15 PM

    • Leena
    • Not Ranked
    • Joined on 01-20-2007
    • Posts 1

    mail sending in vb code

    Does anyone know how to create a button on a form using VB that essentially calls the 'Send to Mail Recipient' option? I've seen code that works for Jscript (see below), but nothing for VB.


    function SendEmailBtn::OnClick(oEvent)
    {
    createEmail();
    }



    function createEmail()
    {
    var xmlContributors =
    XDocument.DOM.selectNodes("/iss:issue/iss:contributors/iss:contributor");
    var xmlContributor;
    var xmlTitle = XDocument.DOM.selectSingleNode("/iss:issue/iss:title");
    var rgRecipients = new Array();

    while (xmlContributor = xmlContributors.nextNode())
    rgRecipients.push(getNodeValue(xmlContributor.selectSingleNode("iss:emailAddressPrimary")));

    try
    {
    var oEnvelope = XDocument.View.Window.MailEnvelope;

    oEnvelope.To = rgRecipients.join("; ");
    oEnvelope.Subject = getNodeValue(xmlTitle);
    oEnvelope.Visible = true;
    }
    catch (ex)
    {
    XDocument.UI.Alert(ex.description);
    }
    }
  • 01-22-2007 08:51 PM In reply to

    Re: mail sending in vb code

    Hi Leena and welcome to the forum!

    This has been discussed countless times on the forum so I'm sure you will be able to find a VB code snippet to do what you are asking.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.