View Single Post
 
Old 12-25-2020, 01:54 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2010
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

Quote:
Originally Posted by victorybadges View Post
I have tested the macro and it works wonderfully except for 1 thing which can be fixed manually. The images are not centred as the cell margins are not set to zero. (PS I used fixed width columns)
Unless you have some default set up with different left/right and/or top/bottom margins, the images cannot but be centered in the cells. nevertheless, I've added code to eliminate all cell margins.
Quote:
Originally Posted by victorybadges View Post
As I use varying fixed column widths in different tables is there a way of enabling a fixed width question to be prompted on run time to save me from editing the macro each time.
After:
Code:
RwHght = CentimetersToPoints(CSng(InputBox("What max height for the pictures, in Centimeters (e.g. 5)?")))
insert:
Code:
ColWdth = CentimetersToPoints(CSng(InputBox("What max column width for the pictures, in Centimeters (e.g. 8)?")))
and either delete:
Code:
ColWdth = TblWdth / NumCols
or change that line to:
Code:
If TblWdth / NumCols < ColWdth Then ColWdth = TblWdth / NumCols
Delete the line if you don't care whether the cumulative specified column width exceeds the page margins; otherwise, make the change.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote