Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Fri, 11 Jan 2008 01:23:00 -0800,    group: microsoft.public.word.vba.beginners        back       


Automatic size change on all imported pictures   
Hi,

I generate word (2003) documents with several imported pictures.
But these pictures are to large so I have to change the size to 80% by hand.

How can I automatic change the size for all pictures in the file?
I have tried to record a macro to do this, but during this recording I can't 
select any pictures in the document. I don't understand why.

Best regards,
/Sören
date: Fri, 11 Jan 2008 01:23:00 -0800   author:   Sören_Marodören

Re: Automatic size change on all imported pictures   
Hi Sören,

your pictures are probably inlineshapes.

If so, try:

Sub Test6778a()
Dim oInl As InlineShape
For Each oInl In ActiveDocument.InlineShapes
' for testing
'  MsgBox "x = " & Format(oInl.Width, "#") & _
   Chr (13) & "y = " & Format(oInl.Height, "#")
   oInl.Width = oInl.Width * 0.8
   oInl.Height = oInl.Height * 0.8
Next
End Sub

There is also .scalewidth and .scaleheight,
but it's difficult to apply and help is misleading.

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
date: Fri, 11 Jan 2008 15:16:05 +0100   author:   Helmut Weber

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us