Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
148395 | Oct 17,2019 04:59 PM UTC | Oct 18,2019 09:26 AM UTC | ASP.NET Web Forms (Classic) | 1 |
![]() |
Tags: DocIO |
//Creates an instance of WordDocument class (Empty Word Document) WordDocument document = new WordDocument(); //Opens an existing Word document into DocIO instance document.Open("Table.docx", FormatType.Docx); //Accesses the instance of the first section in the Word document WSection section = document.Sections[0]; //Accesses the instance of the first table in the section WTable table = section.Tables[0] as WTable; //Specifies the auto resize of table to automatically resize all cell width based on its content table.TableFormat.IsAutoResized = true; //Saves and closes the document instance document.Save("TableFormatting.docx", FormatType.Docx); document.Close(); |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.