Skip to content

Instantly share code, notes, and snippets.

@dck-jp
Created September 13, 2012 14:42
Show Gist options
  • Save dck-jp/3714745 to your computer and use it in GitHub Desktop.
Save dck-jp/3714745 to your computer and use it in GitHub Desktop.
Erase Font Decoration
'いろんな文字の装飾をまとめて消す
Sub EraseDecoration()
With Selection.Font
.Bold = False '太字
.Italic = False '斜体
.color = wdColorAutomatic '色
.Underline = wdUnderlineNone '下線
.StrikeThrough = wdNone '打ち消し線
End With
Call EraseHighlight '蛍光ペンの消去
Call EraseBorderLine '囲み線の消去
Call EraseShading '網掛けの消去
End Sub
Private Sub EraseShading()
With Selection.Font.Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
End Sub
Private Sub EraseBorderLine()
With Selection.Font
.Borders(1).LineStyle = wdLineStyleNone
.Borders.Shadow = False
End With
End Sub
Sub EraseHighlight()
Selection.Range.HighlightColorIndex = wdNoHighlight
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment