Applying Styles


To apply a style to a range, paragraph, or multiple paragraphs, set the Style property to a user-defined or built-in style name.

objRange.Style = Normal 
Selection.Range.Style = "My New Style"


F4 - Repeat

If you use this line then F4 cannot be used to repeat the style

Application.Selection.Style = sStyleName 

Instead use the wdDialogFormatStyle dialog box

Dim dlgStyle As Word.Dialog 
dlgStyle = Application.Dialogs(Word.wdWordDialog.wdDialogFormatStyle)
dlgStyle.Name = sStyleName
dlgStyle.Execute()



© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext