|
-
Aug 20th, 2012, 11:33 PM
#1
Thread Starter
New Member
[Word 2007] How to add a single XMLNode to the multiple rows of a table in a Word Doc
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|