View Single Post
 
Old 09-08-2015, 05:24 AM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

What you describe is the normal behaviour, however you can establish whether the font is italic before unlinking then reapply the italics if required e.g.

Code:
Sub UnlinkFormFields()
Dim oFF As FormField
Dim oRng As Range
Dim i As Long
    If Not ActiveDocument.ProtectionType = wdNoProtection Then
        ActiveDocument.Unprotect Password:=""
    End If
    For Each oFF In ActiveDocument.FormFields
        i = Len(oFF.Result)
        Set oRng = oFF.Range
        If oFF.Range.Font.Italic = True Then
            oRng.Fields.Unlink
            oRng.End = oRng.End + i
            oRng.Font.Italic = True
        Else
            oRng.Fields.Unlink
        End If
    Next oFF
lbl_Exit:
    Set oFF = Nothing
    Set oRng = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote