I want to create a file of completed forms. Each form is to be stored locally
(on C:) using C:path\(data from form) as a filename.
Hi,
Try to use:
thisApplication.ActiveWindow.XDocument.SaveAs(YourPath);
where YourPath is C:path\filename
Regards,
Franck Dauché
> I want to create a file of completed forms. Each form is to be stored locally
> (on C:) using C:path\(data from form) as a filename.
Caeanis - 05 Feb 2006 11:51 GMT
I am trying this with the following code, but I get an run-time error message
when I attempt to use it: "The form does not have a file name". The xpath
query although long does work, the messagebox returns the right value for
that node, and I have also tried using the save method instead of the saveas
method. Both generate errors.
Dim myPath, 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/infopath/2003/myXSD/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\" & objXMLNode.text & ".xml"
Msgbox "You are about to save the following file: " & objXMLNode.text &
".xml"
XDocument.SaveAs(myPath)
> Hi,
>
[quoted text clipped - 8 lines]
> > I want to create a file of completed forms. Each form is to be stored locally
> > (on C:) using C:path\(data from form) as a filename.