-
-
Save hedgejanuary/efc93717de2322d22524e7ad94b41c05 to your computer and use it in GitHub Desktop.
Word macro to apply styles in the selected range.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub newsFormat() | |
With Selection | |
.Paragraphs(1).Style = "見出し 1" | |
.Sentences(1).Bold = True | |
.Paragraphs(2).Range.InsertBefore Text:="●" | |
.Paragraphs(2).Style = "見出し 2" | |
.Sentences(2).Bold = True | |
.Paragraphs(3).Style = "行間詰め" | |
.Paragraphs(3).LeftIndent = MillimetersToPoints(millimeters:=5) | |
.Paragraphs(4).Style = "行間詰め" | |
.Paragraphs(4).LeftIndent = MillimetersToPoints(millimeters:=5) | |
.Paragraphs(4).Range.InsertBefore Text:="<" | |
ActiveDocument.Range(Start:=.Paragraphs(4).Range.End - 1).InsertBefore Text:=">" | |
End With | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment