Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-11-2017, 05:54 AM
CL-FL CL-FL is offline Formatting existing pictures in a document Windows 10 Formatting existing pictures in a document Office 2003
Novice
Formatting existing pictures in a document
 
Join Date: Jan 2017
Posts: 2
CL-FL is on a distinguished road
Default Formatting existing pictures in a document


I am trying to format pictures in a membership roster that I have inherited that has been created & worked on by multiple users over the years. The document is set up as a table, with the first column having the member's picture, and the other 2 columns containing personal information.

I'd like to format all the pictures to be the same size, but cannot find any way to do that to all the pictures at one time.

Also, is there some way to set that as a default for this document so that all future pictures will default to that size?

Thanks for any help!
Carol
Reply With Quote
  #2  
Old 01-11-2017, 05:31 PM
macropod's Avatar
macropod macropod is offline Formatting existing pictures in a document Windows 7 64bit Formatting existing pictures in a document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

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
Note: the macro assumes the first fixed-dimension cell the images are to be constrained to is the first one on the second row of the selected table. If it isn't, change both instances of '2' in the code to the correct row #.

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]
Reply With Quote
  #3  
Old 01-13-2017, 05:24 AM
CL-FL CL-FL is offline Formatting existing pictures in a document Windows 10 Formatting existing pictures in a document Office 2003
Novice
Formatting existing pictures in a document
 
Join Date: Jan 2017
Posts: 2
CL-FL is on a distinguished road
Default

Macropod - Thank you so much for your reply. At first, I thought this was the solution for me, and it still may be but I have another question.

In some instances, the rows are not the same height, since sometimes a member has 2 addresses (seasonal members). In that case, do I need to set the height to the greatest height needed, or can I set the height universally as you directed above, and then change it when needed?

Thanks again!
Carol
Reply With Quote
  #4  
Old 01-13-2017, 02:18 PM
macropod's Avatar
macropod macropod is offline Formatting existing pictures in a document Windows 7 64bit Formatting existing pictures in a document Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

If you need to work with rows of varying height, replace .Height in:
sHght = .Height
with whatever number of points you need the pictures to be.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
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
Formatting existing pictures in a document Help formatting Pictures inside a Text Box in Word 2013 jstumbo87 Word 2 01-29-2014 12:07 PM
Formatting Restrictions Pictures garryjunada Word 7 11-05-2013 02:25 AM
Formatting existing pictures in a document Best way to insert sub-document into existing document lsmcal1984 Word 7 08-21-2013 11:11 PM
Formatting existing text Kaila Word 0 09-03-2011 05:40 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft