J
jody frazier
I would like to have 1 button that would email the form and save it to the
same location when clicked. Right now I'm accomplishing this with using a
"email button" with the data connection attached to it to email my form and
then a "save button" to save the form to the same location. I would like to
combine the 2 if possible. Of course I don't have code for the email since
I'm using a data connection for that but here is my code to save the form to
the default location:
Sub CTRL2_9_OnClick(eventObj)
Dim txtPath
Dim txtName
Dim GMSRef
GMSRef = XDocument.DOM.selectSingleNode("my:myFields/my:JobNum").text
txtPath = "C:\My Documents\InfoPath Forms\"
txtName = ".xml"
XDocument.SaveAs(txtpath & GMSRef & txtName)
thisXDocument.Application.Close(true)
End Sub
Any ideas anyone?
same location when clicked. Right now I'm accomplishing this with using a
"email button" with the data connection attached to it to email my form and
then a "save button" to save the form to the same location. I would like to
combine the 2 if possible. Of course I don't have code for the email since
I'm using a data connection for that but here is my code to save the form to
the default location:
Sub CTRL2_9_OnClick(eventObj)
Dim txtPath
Dim txtName
Dim GMSRef
GMSRef = XDocument.DOM.selectSingleNode("my:myFields/my:JobNum").text
txtPath = "C:\My Documents\InfoPath Forms\"
txtName = ".xml"
XDocument.SaveAs(txtpath & GMSRef & txtName)
thisXDocument.Application.Close(true)
End Sub
Any ideas anyone?