Hi, here a sample of code to get value in VBS:
Dim sFileCode
sFileCode= XDocument.DOM.selectSingleNode( "/my:XPATH").text
You have to replace "/my:XPATH" by your current code Xpath.
and after that, just replace:
XDocument.SaveAs(txtPath & txtName)
By:
XDocument.SaveAs(txtPath & txtName &sFileCode)