To do that, you could add a new variables declaration line with, say:
Code:
Dim sA_BPad As Single, sL_RPad As Single: sA_BPad = CentimetersToPoints(0.25): sL_RPad = CentimetersToPoints(0.5)
Use whatever values you need for the Above/Below padding and Left/Right padding.
You might also want to change 'max width for the pictures' and 'max height for the pictures' in the following two prompts to something like 'cell widths' and 'cell heights', respectively.
Code:
ColWdth = CentimetersToPoints(CSng(InputBox("What max width for the pictures, in Centimeters (e.g. " & Format(ColWdth, "0.00") & ")?")))
RwHght = CentimetersToPoints(CSng(InputBox("What max height for the pictures, in Centimeters (e.g. 5)?")))
Then change the
code block to:
Code:
With iShp
.LockAspectRatio = True
.Width = ColWdth - sL_RPad
If .Height > RwHght - sA_BPad Then .Height = RwHght - sA_BPad
End With
and insert:
Code:
.Borders(wdBorderTop).LineStyle = wdLineStyleNone
anywhere in the
Code:
With .Rows(x + 1)
End With
code block.