My users create a table within Word which consists of a header row with the desired column names and one empty row which is formatted as they want the inserted rows to be formatted.
Using a comma delimited string of values I populate the row with data. Each new row added keeps the formatting of the previous row.
Using the Documentation and Forums I have been able to work out how to find the table and add a row with the data from the string correctly placed into each column but I lose the formatting. Is there a way to easily "Copy" the format of an exsiting row when adding a new row programatically.
Something like this would be great
bool copyFormatting = true;
table.InsertAfter(new Row(), table.LastRow, copyFormatting);
This would add the new row after the last row in the table and copy all the formatting of the row it is inserting after.
perhaps allow a RowFormat to be passed into the Insert function which is used to format the new row that is added?
table.InsertAfter(new Row(), table.LastRow, table.LastRow.RowFormat);
I know there is the Mail Merge functionality to work with tables but I cannot use Mail Merge as I have to be able to work with existing functionality.
All help is greatly appreciated.