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
chetan AllipurPosted May 4, 2017, 7:55 AM
Karthi KeyanPosted May 4, 2017, 7:50 AM
chetan AllipurPosted May 4, 2017, 7:46 AM
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 AllipurPosted May 4, 2017, 7:45 AM
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 AllipurPosted May 4, 2017, 7:44 AM
Karthi KeyanPosted May 4, 2017, 7:38 AM