Click here to Skip to main content
15,908,618 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to Insert table in the existing word document to the specified place using Open XML Method. I found some codes from google, but the following table cell properties not working, and the table is inserting in the last page. I want to insert this table in the specified place eg: Book Mark or replace text and insert table

TableProperties tblProp = new TableProperties(
           new TableBorders(
               new TopBorder() { Val =
                   new EnumValue<bordervalues>(BorderValues.Dashed), Size = 24 },
               new BottomBorder() { Val =
                   new EnumValue<bordervalues>(BorderValues.Dashed), Size = 24 },
               new LeftBorder() { Val =
                   new EnumValue<bordervalues>(BorderValues.Dashed), Size = 24 },
               new RightBorder() { Val =
                   new EnumValue<bordervalues>(BorderValues.Dashed), Size = 24 },
               new InsideHorizontalBorder() { Val =
                   new EnumValue<bordervalues>(BorderValues.Dashed), Size = 24 },
               new InsideVerticalBorder() { Val =
                   new EnumValue<bordervalues>(BorderValues.Dashed), Size = 24 }
           )
       );


IF i put this code then showing Error as Invalid format
Posted
Updated 7-Aug-13 21:01pm
v2
Comments
Robymon 8-Aug-13 4:04am    
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

 
Share this answer
 
Comments
Robymon 8-Aug-13 4:11am    
How to Insert table in the specified place, eg: i want to replace one text in word document and insert table on that place.

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