Hi Doug
Using Charles' info and Bill Coan's info at:
http://word.mvps.org/faqs/macrosvba/AssignMacroToText.htm,
I've created a macrobutton which toggles the textstrings. But I'm stuck at
formatting the font, in order to strikethrough one of the options. Can you
please help?
Here's the code I'm working with;
(Note that lines 12-15 are the lines I've added in an attempt to format the
text string") I've also carried out a search to find a solution to formatting
the font of a defined textstring, in the the other newsgroups, but haven't
come up with anything.
Sub TextCarousel()
Dim str1 As String, str2 As String, str3 As String, str4 As String
str1 = "Yes"
str2 = "No"
str3 = "Yes"
str4 = "No"
Select Case Mid(Selection.Fields(1).Code.Text, 26)
Case str1
Selection.Fields(1).Code.Text = _
"macrobutton TextCarousel " & str1 & str2
str2.Select
With Selection.Font
.StrikeThrough = True
End With
Case str2
Selection.Fields(1).Code.Text = _
"macrobutton TextCarousel " & str3 & str4
str3.Select
With Selection.Font
.StrikeThrough = True
End With
Case Else
Selection.Fields(1).Code.Text = _
"macrobutton TextCarousel " & str3
End Select
End Sub