w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Creating Table of Contents using VSTO and Word

This code works for me, try it:

selection.Font.Bold = 1;
selection.TypeText("Table of Content
");  
TableOfContents toc = wordDoc.TablesOfContents.Add(selection.Range, ref
missing, ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing);




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.