Greetings,
I am working with the MS XML objects and having difficulty obtaining a return code from the Save method. If the save fail (for testing I set the read-only attribute bit to force the save to fail), immediately the code jumps to my error handler.
Per the documentation:
save Method (DOMDocument)
http://msdn.microsoft.com/en-us/library/windows/desktop/ms753769(v=vs.85).aspx
there appears to be a C/C++ Return Value. Why does the VBA implementation not return a value? Sample code as follows:
	
	
	
		
 I am working with the MS XML objects and having difficulty obtaining a return code from the Save method. If the save fail (for testing I set the read-only attribute bit to force the save to fail), immediately the code jumps to my error handler.
Per the documentation:
save Method (DOMDocument)
http://msdn.microsoft.com/en-us/library/windows/desktop/ms753769(v=vs.85).aspx
there appears to be a C/C++ Return Value. Why does the VBA implementation not return a value? Sample code as follows:
		Code:
	
	
	  Dim objXMLDoc As Object
  Dim objXMLNodes As Object
  Dim vntRC As Variant
  Set objXMLDoc = CreateObject("Msxml2.DOMDocument.6.0")
  If objXMLDoc.Load("C:\Documents and Settings\c_mlueck\Desktop\6041905.xml") Then
    Set objXMLNodes = objXMLDoc.childNodes
    Call DisplayXMLNode(objXMLNodes, 0)
  End If
[COLOR=Red][B]  vntRC = objXMLDoc.Save("C:\Documents and Settings\c_mlueck\Desktop\6041905save.xml")[/B][/COLOR]
  Debug.Print "vntRC=>" & vntRC & "<"
Exit_btnTestXML_Click:
  Set objXMLNodes = Nothing
  Set objXMLDoc = Nothing