![]() |
#31
|
|||
|
|||
![]()
Awesome Macro, Thank you so much for it! 2 small questions;
How would I a buffer to the top and bottom of the image within the cell? I changed: .TopPadding = 0 .BottomPadding = 0 But it did not resize the image to fit and cut off the bottom of the image. Also can I get it to not draw a border on the top of the text cell? |
#32
|
||||
|
||||
![]()
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) 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)?"))) Code:
With iShp End With Code:
With iShp .LockAspectRatio = True .Width = ColWdth - sL_RPad If .Height > RwHght - sA_BPad Then .Height = RwHght - sA_BPad End With Code:
.Borders(wdBorderTop).LineStyle = wdLineStyleNone Code:
With .Rows(x + 1) End With
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to insert and hide images | ricecrispies | Excel | 8 | 06-18-2022 04:19 AM |
Mutliple Selection List Box | tbrynard01 | Word | 0 | 09-10-2019 12:56 PM |
Insert images into word form | lfabiof | Word VBA | 1 | 12-24-2017 09:51 PM |
Programmatically insert digital signature into a Word document | tinamanns | Word | 0 | 04-12-2017 01:16 PM |
![]() |
John-N | Mail Merge | 5 | 02-19-2012 07:15 PM |