F
frogman
This code does what I want it to except one thing:
When you click the field and start typing I want the text to change to
black.
The field looks like this
[One list]
the [] are not part of the field, they are demarkators for the user to
know this is an option in the text. They are also bold and red.
When the user types over the field it is red bold text and i want it to
be normal black text.
With myRng
.Delete
.Collapse wdCollapseEnd
.Fields.Add Range:=myRng, Type:=wdFieldEmpty, Text:="GOTOBUTTON
" & strBookMarkName & " ", PreserveFormatting:=False
.Move Unit:=wdWord, count:=5
.Fields.Add Range:=myRng, Type:=wdFieldQuote,
PreserveFormatting:=False
.Move Unit:=wdWord, count:=2
.InsertAfter ("""" & strSelection & """ \* CharFormat")
.Move Unit:=wdWord, count:=2
If blnLastRowOfTable = False And blnInTable = False Then
.InsertAfter vbCr
End If
End With
'finds and changes the Q to red and updates the fields
With Selection
.Font.Color = wdColorAutomatic
.Font.Bold = False
.Font.Italic = False
.find.ClearFormatting
.find.Forward = False
.find.MatchCase = True
.find.Text = "Q"
.find.Execute
.Font.Color = wdColorRed
.Font.Italic = True
.Fields.Update
End With
When you click the field and start typing I want the text to change to
black.
The field looks like this
[One list]
the [] are not part of the field, they are demarkators for the user to
know this is an option in the text. They are also bold and red.
When the user types over the field it is red bold text and i want it to
be normal black text.
With myRng
.Delete
.Collapse wdCollapseEnd
.Fields.Add Range:=myRng, Type:=wdFieldEmpty, Text:="GOTOBUTTON
" & strBookMarkName & " ", PreserveFormatting:=False
.Move Unit:=wdWord, count:=5
.Fields.Add Range:=myRng, Type:=wdFieldQuote,
PreserveFormatting:=False
.Move Unit:=wdWord, count:=2
.InsertAfter ("""" & strSelection & """ \* CharFormat")
.Move Unit:=wdWord, count:=2
If blnLastRowOfTable = False And blnInTable = False Then
.InsertAfter vbCr
End If
End With
'finds and changes the Q to red and updates the fields
With Selection
.Font.Color = wdColorAutomatic
.Font.Bold = False
.Font.Italic = False
.find.ClearFormatting
.find.Forward = False
.find.MatchCase = True
.find.Text = "Q"
.find.Execute
.Font.Color = wdColorRed
.Font.Italic = True
.Fields.Update
End With