I created the buttons like NumHeading up to 1 to 5. If i click the button one i want to dispaly like this "1" second button "1.1" third buttton "1.1.1" so on up to button 5. Please send code for this in c#. I am wating it is urgent.
I want to display the custom functions for Numbered Headings list as in word

Karthi KeyanRank #1,926 · 762 reputationPosted May 4, 2017, 3:38 AM EDT
chetan AllipurRank #2,527 · 554 reputationPosted May 4, 2017, 3:44 AM EDT
chetan AllipurRank #2,527 · 554 reputationPosted May 4, 2017, 3:45 AM EDT
Microsoft.Office.Interop.Word.Document doc1 = app.ActiveDocument;
Selection wordSelection = Globals.ThisAddIn.Application.Selection;
ListGallery gallery = wordSelection.Application.ListGalleries[WdListGalleryType.wdOutlineNumberGallery];
ListTemplate numberedTemplate = gallery.ListTemplates[2];
{
Microsoft.Office.Interop.Word.Style style = doc1.Styles["Heading " + i];
style.LinkToListTemplate(numberedTemplate, i);
chetan AllipurRank #2,527 · 554 reputationPosted May 4, 2017, 3:46 AM EDT
Microsoft.Office.Interop.Word.Document doc1 = app.ActiveDocument;
Selection wordSelection = Globals.ThisAddIn.Application.Selection;
ListGallery gallery = wordSelection.Application.ListGalleries[WdListGalleryType.wdOutlineNumberGallery];
ListTemplate numberedTemplate = gallery.ListTemplates[2];
{
Microsoft.Office.Interop.Word.Style style = doc1.Styles["Heading " + i];
style.LinkToListTemplate(numberedTemplate, i);
}
Karthi KeyanRank #1,926 · 762 reputationPosted May 4, 2017, 3:50 AM EDT
chetan AllipurRank #2,527 · 554 reputationPosted May 4, 2017, 3:55 AM EDT