Wordマクロ すべてのスタイル書式を出力する
How can I export Style names and definitions from MS-Word 2010 QuickStyle Set or Template?
Sub describeAllStylesWeCareAbout()
' by Jessica Weissman
Dim docActive As Document
Dim docNew As Document
Dim styleLoop As Style
Set docActive = ActiveDocument
Set docNew = Documents.Add
For Each styleLoop In docActive.Styles
If styleLoop.Type < 3 Then
' show only character and paragraph styles, not list or table styles
With docNew.Range
.InsertAfter Text:=styleLoop.NameLocal & Chr(9) _
& styleLoop.Description
.InsertParagraphAfter
.InsertParagraphAfter
End With
End If
Next styleLoop
End Sub
' by Jessica Weissman
Dim docActive As Document
Dim docNew As Document
Dim styleLoop As Style
Set docActive = ActiveDocument
Set docNew = Documents.Add
For Each styleLoop In docActive.Styles
If styleLoop.Type < 3 Then
' show only character and paragraph styles, not list or table styles
With docNew.Range
.InsertAfter Text:=styleLoop.NameLocal & Chr(9) _
& styleLoop.Description
.InsertParagraphAfter
.InsertParagraphAfter
End With
End If
Next styleLoop
End Sub
0 件のコメント:
コメントを投稿