i tried to insert a table into a docx-Document by searching for a Bookmark and inserting my Table there:
- Code: Select all
...open Document...
BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(doc);
bookmarkNavigator.MoveToBookmark(bookmarkName);
bookmarkNavigator.InsertTable(table);
...save Document...
That works fine.
Now i tried to set the Style of my new Table to a custom Style in our given Document. I can find the Style by,
- Code: Select all
Spire.Doc.Documents.Style style = doc.Styles.FindByName("CustomStyleName");
but i have no Idea how to set the Style to my table.
I just can set the Style to a DefaultTableStyle from this enum by this:
- Code: Select all
table.ApplyStyle(DefaultTableStyle...);
but i want to set the Style to a custom one.
many thanks and best regards,
Joachim