C
Caeanis
I have created a button when clicked should save the form to the name
specified in a text box on the form. Following code below:
' Write your code here
Dim xslt
Dim xslDoc
Dim xslProc
Dim objXMLNode
Set objXMLNode = XDocument.DOM.selectSingleNode("/*[local-name()='Recipe'
and
namespace-uri()='http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-10-08T23:36:28']/*[local-name()='Header'
and
namespace-uri()='http://schemas.microsoft.com/office...2005-10-08T23:36:28'][1]/*[local-name()='Name'
and
namespace-uri()='http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-10-08T23:36:28'][1]")
myPath = "C:\Inetpub\wwwroot\Recipes\" & objXMLNode.text & ".xml"
Msgbox "You are about to save the following file: " & objXMLNode.text &
".htm"
XDocument.Save(myPath)
However I get an error message on the following line: XDocument.Save(myPath)
Is there something I'm missing?
specified in a text box on the form. Following code below:
' Write your code here
Dim xslt
Dim xslDoc
Dim xslProc
Dim objXMLNode
Set objXMLNode = XDocument.DOM.selectSingleNode("/*[local-name()='Recipe'
and
namespace-uri()='http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-10-08T23:36:28']/*[local-name()='Header'
and
namespace-uri()='http://schemas.microsoft.com/office...2005-10-08T23:36:28'][1]/*[local-name()='Name'
and
namespace-uri()='http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-10-08T23:36:28'][1]")
myPath = "C:\Inetpub\wwwroot\Recipes\" & objXMLNode.text & ".xml"
Msgbox "You are about to save the following file: " & objXMLNode.text &
".htm"
XDocument.Save(myPath)
However I get an error message on the following line: XDocument.Save(myPath)
Is there something I'm missing?