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.

Mon Oct 15, 2012 6:03 am

Hi,

Is it possible to bookmark a table in a document? As i see, at the moment, bookmarks can only be inserted in a paragraph, and paragraph has no "AppendTable" Function.

catalin
 
Posts: 48
Joined: Wed Mar 14, 2012 12:56 pm

Tue Oct 16, 2012 8:42 am

Hi catalin,

Thanks for your inquiry.
Spire.doc support the function, we provide you a sample demo. If you have any problem, please feel free to contact us.
Code: Select all
            Table table = section.AddTable(true);
            table.ResetCells(1, 2);

            TableCell cell = table.Rows[0].Cells[0];
            Paragraph paragraph = cell.AddParagraph();

            paragraph.AppendBookmarkStart("Table");
            paragraph.AppendBookmarkEnd("Table");


Best ragards,
Amy
E-iceblue support
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc