![]() |
#2
|
||||
|
||||
![]()
If you format the table so the cell into which the pictures are to go has a fixed cell height and width, any pictures not already in the document that you insert into those cells will automatically be constrained to fit the space available.
To apply a fixed height and width: • For the rows, set the exact row height under Table Tools>Layout>Properties>Row>Specify Height>Exactly. • For the columns, set the preferred column width under Table Tools>Layout>Properties>Columns and uncheck the 'automatically resize to fit contents' option under Table Tools>Layout>Properties>Table>Options Having done that for the table, the following macro with resize the existing pictures in the cells concerned. Code:
Sub ResizePics() Application.ScreenUpdating = False Dim r As Long, sWdth As Single, sHght As Single With Selection If .Information(wdWithInTable) = True Then With .Tables(1) With .Cell(2, 1) sWdth = .Width: sHght = .Height End With For r = 2 To .Rows.Count With .Cell(r, 1).Range If .InlineShapes.Count > 0 Then With .InlineShapes(1) .LockAspectRatio = True .Width = sWdth If .Height > sHght Then .Height = sHght End With End If End With Next End With End With Application.ScreenUpdating = True End Sub For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm For Mac macro installation & usage instructions, see: http://word.mvps.org/Mac/InstallMacro.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PowerPoint Distorting/Blocking Pictures in an Already-Existing Deck | Orin Albrecht | PowerPoint | 0 | 12-10-2016 08:22 PM |
![]() |
jstumbo87 | Word | 2 | 01-29-2014 12:07 PM |
Formatting Restrictions Pictures | garryjunada | Word | 7 | 11-05-2013 02:25 AM |
![]() |
lsmcal1984 | Word | 7 | 08-21-2013 11:11 PM |
Formatting existing text | Kaila | Word | 0 | 09-03-2011 05:40 PM |