View Single Post
 
Old 02-19-2024, 05:30 AM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,383
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

For example (easier to code than explain):

Code:
Sub Demo()
' Sourced from: https://www.msofficeforums.com/mail-merge/52094-cross-references-lost-after-mail-merge.html
Application.ScreenUpdating = False
Dim i As Long
With ActiveDocument
  .Fields.Update
  .MailMerge.MainDocumentType = wdNotAMergeDocument
  For i = .Fields.Count To 1 Step -1
    With .Fields(i)
      Select Case .Type
        Case wdFieldMergeField, wdFieldMergeBarcode, wdFieldMergeRec, wdFieldMergeSeq: .Unlink
      End Select
    End With
  Next i
End With
Application.ScreenUpdating = True
With Application.Dialogs(wdDialogFileSaveAs)
  .Format = wdFormatXMLDocument
  .Show
End With
End Sub
Note: You'll need to save the mailmerge main document in the .docm format after adding the macro.

For PC macro installation & usage instructions, see: Installing Macros
For Mac macro installation & usage instructions, see: Word:mac - Install a Macro
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote