myEnvelope.Subject Help - InfoPath Dev
in

InfoPath Dev

myEnvelope.Subject Help

Last post 04-22-2013 01:41 AM by Jimmy. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-09-2013 12:22 PM

    myEnvelope.Subject Help

    Good Afternoon,

    I am unable to use the email submit functions for a form I'm developing because it requires domain trust. As such, I am using code to allow the user to send the current view of the form instead. Everything is working as required, but I would like to pull a field and place it in the subject line using code. I did this several years ago using JS, but have tried a thousand ways in VB and can't get it to work. Can anyone shed some light? Here is my current code:

             Public Sub CTRL15_13_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)
                Dim myEnvelope As MailEnvelope = _
                   Me.Application.ActiveWindow.MailEnvelope
                ' Specify addresses, subject, and introduction.
                myEnvelope.To = ""
                myEnvelope.CC = ""
                myEnvelope.Bcc = ""
                myEnvelope.Subject = ""
                ' Display form with e-mail envelope.
                myEnvelope.Visible = True
            End Sub

     I need the myEnvelope.Subject line to pull the CONFTitle field, which has an Xpath address of /dfs:myFields/dfs:dataFields/d:tblConferenceDetails/@CONFTitle

    Any suggestions would be greatly appreciated. I could not find any reference to this particular issue searching the forum.

    Thanks,
    Geoff

  • 04-22-2013 01:41 AM In reply to

    Re: myEnvelope.Subject Help

    Try this:

         myEnvelope.Subject = CreateNavigator().SelectSingleNode("/dfs:myFields/dfs:dataFields/d:tblConferenceDetails/@CONFTitle", NamespaceManager).Value

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.