RFArnold
10-13-2017, 01:33 PM
I am trying to create a Word (Mac Office 365) macro to toggle hidden text on with red text, and off returning to default text color.
This seems to work if the text is already hidden, but it doesn't do anything if not. Can someone please show me what I am doing wrong? Oh, and I am not trying to convert selected text... but change the text style at the insertion point for what I will type next.
Sub Comment()
'
' Comment Macro
If Selection.Font.Hidden = False Then
With Selection.Font
.Hidden = True
.Color = wdColorRed
End With
Else
With Selection.Font
.Hidden = False
.Color = wdColorAutomatic
End With
End If
End Sub
Sub EndComment()
THANK YOU!!
This seems to work if the text is already hidden, but it doesn't do anything if not. Can someone please show me what I am doing wrong? Oh, and I am not trying to convert selected text... but change the text style at the insertion point for what I will type next.
Sub Comment()
'
' Comment Macro
If Selection.Font.Hidden = False Then
With Selection.Font
.Hidden = True
.Color = wdColorRed
End With
Else
With Selection.Font
.Hidden = False
.Color = wdColorAutomatic
End With
End If
End Sub
Sub EndComment()
THANK YOU!!