View Single Post
 
Old 05-20-2020, 06:03 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
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

There is no built-in facility for enlarging undersize images to fit a table. The following macro added to your mailmerge main document will address that for merges to new documents:
Code:
Sub MailMergeToDoc()
Application.ScreenUpdating = False
Dim Tbl As Table, iShp As InlineShape
ActiveDocument.MailMerge.Execute
For Each Tbl In ActiveDocument.Tables
  With Tbl.Range
    For Each iShp In .InlineShapes
      With iShp
        .LockAspectRatio = True
        With .Range.Cells(1)
          If .Height <> iShp.Height Then
            If .Width <> iShp.Width Then
              iShp.Height = .Height
              If iShp.Width > .Width Then
                iShp.Width = .Width
              End If
            End If
          End If
        End With
      End With
    Next
  End With
Next
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote