Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2008

Tip: Looking for answers? Try searching our database.

Automatic size change on all imported pictures

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sören_Marodören - 11 Jan 2008 09:23 GMT
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
Helmut Weber - 11 Jan 2008 14:16 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.