Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Dec 05, 2019 1:01 pm

Hello everybody,

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

joachim_eckerl
 
Posts: 10
Joined: Thu Dec 05, 2019 12:52 pm

Fri Dec 06, 2019 3:36 am

Hello,

Thanks for your inquiry.
Sorry for the turth that our Spire.Doc doesn't support applying a custom table style for table at present. We will consider adding this new feature into our further upgrade, if it is achieved in the future, I will inform you.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1187
Joined: Tue Sep 27, 2016 1:06 am

Fri Dec 06, 2019 8:14 am

Hello,

thanks for your answer.
Now i can stop searching.

Best regards,
Joachim

joachim_eckerl
 
Posts: 10
Joined: Thu Dec 05, 2019 12:52 pm

Return to Spire.Doc