2003 Form fields losing formatting in 2007

M

Mustang

Hi there,

I have some forms, created in Word 2003, which when opened as a .docx, all
form fields revert to Times New Roman font but if they are opened as a .doc,
they are in the correct font of Arial.

Anyone got any ideas why and how I can fix this?

Thanks very much.
 
G

Graham Mayor

This doesn't make any sense. Documents always open in the format in which
they are saved. What *exactly* are you doing?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Mustang

Sorry didnt explain myself very well. My team saved some of our 2003
templates as 2007 templates (no changes were made except file format) and
when we create documents from the dotx template, our fields which were
previously Arial are now Times New Roman.

It could be something we have done inadvertantly.

Thanks
 
G

Graham Mayor

Fields? What sort of fields? Is the surrounding text OK? If it is, the
following macro may fix it. Run the macro on the opened template and choose
the option to add the charformat switch then save it with a new name.

Sub ChangeSwitch()
Dim oRng As Range
Dim iFld As Integer
Dim strChoice As String
strChoice = MsgBox("Replace Mergeformat switch with Charformat switch?" _
& vbCr & "Click 'No' to remove formatting switch completely", _
vbYesNoCancel, "Replace Formatting Switch")
If strChoice = vbCancel Then GoTo UserCancelled
If strChoice = vbNo Then
For iFld = ActiveDocument.Fields.Count To 1 Step -1
With ActiveDocument.Fields(iFld)
If .Type <> wdFieldFormCheckBox And _
.Type <> wdFieldFormDropDown And _
.Type <> wdFieldFormTextInput Then
.Code.Text = Replace(.Code.Text, " \* MERGEFORMAT", "")
.Code.Text = Replace(.Code.Text, " \* CHARFORMAT", "")
End If
End With
Next iFld
End If
If strChoice = vbYes Then
For iFld = ActiveDocument.Fields.Count To 1 Step -1
With ActiveDocument.Fields(iFld)
If .Type <> wdFieldFormCheckBox And _
.Type <> wdFieldFormDropDown And _
.Type <> wdFieldFormTextInput Then
If InStr(1, .Code, "MERGEFORMAT") <> 0 Then
.Code.Text = Replace(.Code.Text, "MERGE", "CHAR")
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
Exit Sub
UserCancelled:
MsgBox "User Cancelled", vbInformation, "Replace Formatting Switch"
End Sub

http://www.gmayor.com/installing_macro.htm

Could you send me one of the errant templates in Word 2003 and 2007 formats
so that I can see where the problem lies and investigate a solution to fix
it?
Use the link on the home page of my web site.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
M

Mustang

Thank you very much.

This worked and we also tried just applying styles and this worked also. We
found that the Normal style was not set up correctly. Still not sure why we
didnt run into this in the previous version but everyone is happy now it is
all fixed.

Thanks very much for your time
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top