View Single Post
 
Old 09-13-2022, 04:23 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

You can indeed use the .FitText method in a post-merge macro, but restrict its application to cells in which text wrapping occurs. For example:
Code:
        With ActiveDocument.Tables(t).Cell(r, c).Range
            If .Characters.Last.Previous.Information(wdVerticalPositionRelativeToPage) <> _
              .Characters.First.Information(wdVerticalPositionRelativeToPage) Then
              .FitTextWidth = w
            End If
        End With
where:
• t is the table #
• r is the row #
• c is the column#
• w is the width in points
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote