This is the simple code I have in Excel. The problem is that the new document at the end only shows one record in a multi-label list.
I can fix this in the old document by hitting the "Update Labels" button and/or "Preview Results" button. I have tried all kinds of solutions, including Sendkeys Alt M and then B or P but none of these solutions works.
There used to be an old WordBasic command that would propagate the labels, but I thought that it no longer worked in Word 2013; however I have checked this morning and it does in fact still work, so you could use
oWord.WordBasic.MailMergePropagateLabel
to do the job of duplication in place of
Set oRng = oTable.Cell(1, 1).Range
oRng.End = oRng.End - 1
For i = 2 To oTable.Range.Cells.Count
If oTable.Range.Cells(i).Width = oTable.Cell(1, 1).Width And _
oTable.Range.Cells(i).Height = oTable.Cell(1, 1).Height Then
Set oCell = oTable.Range.Cells(i).Range
oCell.End = oCell.End - 1
oCell.FormattedText = oRng
oCell.Collapse 1
oCell.Fields.Add oCell, 41, , False
End If
Next i
Graham Mayor (Microsoft Word MVP 2002-2019) For more Word tips and downloads visit my web site https://www.gmayor.com/Word_pages.htm
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.