From: chris24scanlon on
Hi there. I cannot seem to find an option in MS Word (or a macro) that will
generate a list of the styles in a template along the style definition. Is it
possible to generate a list like this?
From: StevenM on
To: Chris,

Do you want a list of all styles used in your document, or a list of all
styles available?
Each task has its own set of complication, but they are different.

Steven Craig Miller

"chris24scanlon" wrote:

> Hi there. I cannot seem to find an option in MS Word (or a macro) that will
> generate a list of the styles in a template along the style definition. Is it
> possible to generate a list like this?
From: chris24scanlon on
Steven - Ideally all available styles. But if its easier to generate the list
of all styles used in a document, that will work too (it would be a
relatively simple task to create a document based on the all the styles).

Thanks! -chris

"StevenM" wrote:

> To: Chris,
>
> Do you want a list of all styles used in your document, or a list of all
> styles available?
> Each task has its own set of complication, but they are different.
>
> Steven Craig Miller
>
> "chris24scanlon" wrote:
>
> > Hi there. I cannot seem to find an option in MS Word (or a macro) that will
> > generate a list of the styles in a template along the style definition. Is it
> > possible to generate a list like this?
From: StevenM on
To: Chris,

'
' ListAllStyles
'
Sub ListAllStyles()
Dim oStyle As Style
Dim sStyle As String
Dim actDoc As Document
Dim newDoc As Document

Set actDoc = ActiveDocument
Set newDoc = Documents.Add

For Each oStyle In actDoc.Styles
With oStyle
sStyle = "Style: " & .NameLocal & vbCr _
& "Font: " & .Font.Name & vbCr _
& "Size: " & .Font.Size & vbCr _
& .Description & vbCr _
& vbCr
End With
With newDoc.Range
.InsertAfter sStyle
.Collapse wdCollapseEnd
.MoveEnd wdCharacter, 1
End With
Next oStyle
End Sub

Steven Craig Miller

"chris24scanlon" wrote:

> Steven - Ideally all available styles. But if its easier to generate the list
> of all styles used in a document, that will work too (it would be a
> relatively simple task to create a document based on the all the styles).
>
> Thanks! -chris
>
> "StevenM" wrote:
>
> > To: Chris,
> >
> > Do you want a list of all styles used in your document, or a list of all
> > styles available?
> > Each task has its own set of complication, but they are different.
> >
> > Steven Craig Miller
> >
> > "chris24scanlon" wrote:
> >
> > > Hi there. I cannot seem to find an option in MS Word (or a macro) that will
> > > generate a list of the styles in a template along the style definition. Is it
> > > possible to generate a list like this?