Posts

Showing posts from January, 2013

How to Read TOC Headings from word document using C#

Microsoft.Office.Interop.Word.Application wordApplication = new Microsoft.Office.Interop.Word.Application();
object paramMissing = Type.Missing;wordApplication.DisplayAlerts = Microsoft.Office.Interop.Word.WdAlertLevel.wdAlertsNone;
WdExportFormat paramExportFormat = WdExportFormat.wdExportFormatPDF;


bool paramOpenAfterExport = false;WdExportOptimizeFor paramExportOptimizeFor =
WdExportOptimizeFor.wdExportOptimizeForPrint;
WdExportRange paramExportRange = WdExportRange.wdExportAllDocument;

int paramStartPage = 0;
int paramEndPage = 0;WdExportItem paramExportItem = WdExportItem.wdExportDocumentContent;

bool paramIncludeDocProps = true;
bool paramKeepIRM = true;WdExportCreateBookmarks paramCreateBookmarks =
WdExportCreateBookmarks.wdExportCreateWordBookmarks;

bool paramDocStructureTags = true;
bool paramBitmapMissingFonts = true;
bool paramUseISO19005_1 = false;
try{
// Open the source document.wordDocument = wordApplication.Documents.Open(
ref paramSourceDocPath, ref paramMissing, ref paramMissing,
ref…