Hi
As the VBA document said,
As it applies to all other objects in the Applies to list.
Returns a String that represents the XML text in the specified object.
expression.XML(DataOnly)
expression Required. An expression that returns one of the objects in
the Applies To list.
DataOnly Optional Boolean. True returns the text of the XML without the
Word XML markup. The default setting is False.
The true is used when to return the dataonly xml.
e.g. if you have attach an XML schema into the Word Document.
You may have a try with the sample in the smart document sdk.
http://www.microsoft.com/downloads/details.aspx?FamilyID=24A557F7-EB06-4A2C-
8F6C-2767B174126F&displaylang=en
You will find the VBA code below will throw exception too, if you did not
attach a schema.
Sub Test()
Debug.Print ThisDocument.Content.XML(True)
End Sub
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.