Iโm trying to get a list of a all styles in a document. However, some styles are not named other than by their direct formatting notation (such as โ16 pt. Italic, Shadowโ). These styles do not show up in Find or through (the following) code. Other variations include direct modification of an existing style (โList2 + Boldโ), or part of a Normal style. They do appear in the Styles Pane but not the Import/Export Organizer.
How can I find these programmatically?
Public Sub MyFindStyles() On Error GoTo MyErrorHandler Dim currentDocument As Document Set currentDocument = ActiveDocument Dim myStyle As Style For Each myStyle In currentDocument.Styles Debug.Print myStyle.NameLocal DoEvents Next Exit Sub MyErrorHandler: MsgBox “MyFindStyles” & vbCrLf & vbCrLf & “Err = ” & Err.Number & vbCrLf & “Description: ” & Err.Description End Sub