Hi Team,
Could any one please help me on this. Thanks.
This is my sample code I used for creating dynamic custom style.
foreach (string arr_style in array_StyleRules)
{
newStyle = doc.Styles.Add(arr_style, Microsoft.Office.Interop.Word.WdStyleType.wdStyleTypeCharacter);
newStyle.Font.Bold = 1;
newStyle.Font.Italic = 1;
// Apply the custom style to selected text (for example)
if (wordApp.Selection != null && !string.IsNullOrEmpty(wordApp.Selection.Text))
{
wordApp.Selection.set_Style(arr_style);
}
How to create custom event for the customized style. I need to create a new paragraph when click on the current custom style event and current style needs applied for the new paragraph.