Hi Exeperts,

I am developing an Add-In application for Word 2007.

We have a requirement to add a single XMLNode to the multiple rows of a table in a Word Document. I don't know if it is feasible and how to do it if it is the case.

Currently, when the user select multiple rows(such as 2 rows) in a table, and click to insert an XMLNode, then the system will insert an XMLNode for each row, other than for the 2 rows.

The current sample code is following:

Dim docSelection As Microsoft.Office.Interop.Word.Selection = WordApp.Application.Selection
Dim xNode As Microsoft.Office.Interop.Word.XMLNode = Nothing

If docSelection is Nothing Then Return

Try
xNode = docSelection.XMLNodes.Add(''NodeName", namespace, docSelection.Range)
Catch ex As Exception
'Log the exception
End Try


Thanks very much for your help and time.

Kevin Hu