Click here to Skip to main content
15,908,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to Insert table in the specified place, eg: i want to replace one text in word document and insert table on that place.

1 solution

Since you are using, interop is not an option. Microsoft has an OpenXML SDK, with plenty of samples here:[^], but as I see it won't work with c# 2.0.
As OpenXML is an open format, you could make your own code to to the manipulation directly on the XML. You could probably find some third party libraries also, that might work with c# 2.0. But: why c# 2.0? If you have to deal with Word 2007 or above, you need to have at least .net 3.5 installed... so I suggest you forget c# 2.0 as soon as possible.
Share this answer
Robymon 8-Aug-13 4:56am    
I found a code to insert table in the word document using Open XML, but it's inserting in the last page, but my requirement is to insert that table in the middle of the document,replace the Text or Book Mark and insert on that place.
Zoltán Zörgő 8-Aug-13 13:40pm    
And? Modify that code.
Member 12931426 31-Jul-17 9:38am    
share the code please!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900