You will be reproducing the result of the ASK field in a REF field. Toggle
the field display (ALT+F9) and add a \*Charformat switch to each REF field
(remove any \*Mergeformat field already present). Or if you have a lot of
such fields, use the following macro:
Sub ChangeRefSwitch()
Dim oRng As Range
Dim iFld As Integer
Dim strChoice As String
Selection.HomeKey
ActiveDocument.ActiveWindow.View.ShowFieldCodes = True
strChoice = MsgBox("Replace Mergeformat switch with Charformat switch?" _
& vbCr & "Click 'No' to remove formatting switch completely", _
vbYesNoCancel, "Replace Formatting Switch")
If strChoice = 2 Then GoTo UserCancelled
If strChoice = vbYes Then
For iFld = ActiveDocument.Fields.Count To 1 Step -1
With ActiveDocument.Fields(iFld)
If .Type = wdFieldRef Then
If InStr(1, .Code, "MERGEFORMAT") <> 0 Then
.Code.Text = Replace(.Code.Text, "MERGEFORMAT",
"CHARFORMAT")
End If
If InStr(1, .Code, "CHARFORMAT") = 0 Then
.Code.Text = .Code.Text & " \* CHARFORMAT "
End If
.Update
End If
End With
Next iFld
End If
If strChoice = vbNo Then
For iFld = ActiveDocument.Fields.Count To 1 Step -1
With ActiveDocument.Fields(iFld)
If .Type = wdFieldRef Then
If InStr(1, .Code, "MERGEFORMAT") <> 0 Then
.Code.Text = Replace(.Code.Text, "\* MERGEFORMAT", "")
End If
If InStr(1, .Code, "CHARFORMAT") <> 0 Then
.Code.Text = Replace(.Code.Text, " \* CHARFORMAT ", "")
End If
.Update
End If
End With
Next iFld
End If
ActiveDocument.ActiveWindow.View.ShowFieldCodes = False
Exit Sub
UserCancelled:
MsgBox "User Cancelled", vbInformation, "Replace Formatting Switch"
End Sub
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>