Code Snippets


Style Object

A style represents either a built-in style or a user defined style.


Get the Column Number of the selection

This only works for selections, not for ranges.




Styles Collection

You can use the Styles property to return the Styles collection.


If you want to modify styles in a template, use the OpenAsDocument method to open the template as a document
Use Styles(index), where index is a style name, a wdBuiltinStyle constant or index number



If you are using the style name it must match the spelling and spacing of the style name exactly, but not necessarily its capitalization.



The style index number represents the position of the style in the alphabetically sorted list of style names.
Note that Styles(1) is the first style in the alphabetic list.


Description Property




Default Property

In VBA the default property is NameLocal ??


Built-in Property



InUse Property

This property does not tell you whether a style is currently being used but rather tells you if the style is available to be used.
Built-in styles that have not been modified (or applied to any text) in this document will have this property set to False.
User defined styles will always have this property set to True.




BaseStyle Property




Copies all the styles from the attached template to the document




Do not rely on the default members !!!



It is possible to redefine a style based on changes that are made to a portion of text that has been formatted with that style.


Every style object of type wdStyleTypeParagraph has a ParagraphFormat object that represents the paragraph form settings for that style






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