Syntax
UnlinkFields
Remarks
Replaces the selected fields with their most recent results. When you unlink a field, it is converted to regular text or graphics and can no longer be updated automatically. Note that some fields cannot be unlinked — for example, XE (Index Entry) fields, which show no result. If the selection does not contain fields that can be unlinked, an error occurs.
Example
This example unlinks all fields in the active document. First, Word displays
a message box giving the user the option to update all fields before unlinking. Then, depending on the user's response, Word carries out the appropriate action.
answer = MsgBox("Update all fields before unlinking?", \
"Unlink All Fields", 35)
On Error Goto trap
Select Case answer
Case -1 'Yes
EditSelectAll
UpdateFields
UnlinkFields
Case 0 'No
EditSelectAll
UnlinkFields
Case 1 'Cancel
Goto bye
trap:
If Err = 102 Then MsgBox "No fields to unlink." Else Error Err
bye:
End Select
See Also
LockFields, UnlockFields, UpdateFields