chetan Allipur

chetan Allipur

  • NA
  • 541
  • 167.7k

For Custom Numbered Heading Styles "Redo" is not working.

Jun 5 2018 2:32 AM
I am using word VSTO addins.
 
I created the Custom Numbered Heading Styles in word. After applying the Heading style to 1st paragraph, If I use Redo(CTR+Y) to next paragraph it is not working.
 
Here is my code.
 
public void NumHeading1(Office.IRibbonControl control)
{
try
{
Microsoft.Office.Interop.Word.Application app = Globals.ThisAddIn.Application;
Microsoft.Office.Interop.Word.Document doc1 = app.ActiveDocument;
Selection wordSelection = Globals.ThisAddIn.Application.Selection;
wordSelection.Paragraphs.set_Style(WdBuiltinStyle.wdStyleHeading1);
}
catch (Exception ex)
{
throw;
}
}
 
Please anyone can help me in this.