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 / June 2005

Tip: Looking for answers? Try searching our database.

Resizing Inline Shapes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
T. Jenkins - 18 Jun 2005 15:49 GMT
I've searched for help on this, but couldn't find exactly what I'm looking
for.  

I'm pasting images as inline shapes in a Table.  I want to resize all of
them to the same width, say 1 inch (or the equivalent in pixels).  I've tried
recording a macro that does this, but am having trouble.  The pasted images
may vary a little in proportions, so I want to lock proportions when I do the
resize.  This is very easy within Word, but I'm having trouble doing it in
VBA.

What I'd really like is to take action on the select shape, so as soon as I
paste it, I can resize it.  I had a hard time getting a "selection" option to
work, so I shifted to using the Inlineshapes collection.  Below is the code I
was trying to use.

For Each ishape In ActiveDocument.InlineShapes
   ishape.LockAspectRatio = msoTrue
   ishape.Width = 86.4  'Number is what was recorded
Next ishape

Problem is that the aspect ratio line isn't working, and my shapes are being
distorted.  Any suggestions?

Todd
Word Heretic - 20 Jun 2005 04:19 GMT
G'day "T. Jenkins" <TJenkins@discussions.microsoft.com>,

Setting width height by VBA ignores the ratio setting - that is a
convenience for GUI users only. You will have to predetermine the
aspect ratio (Height / width) and ensure your finals fit this.

Eg

Height = (Height / width)
Width = 1

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

T. Jenkins reckoned:

>I've searched for help on this, but couldn't find exactly what I'm looking
>for.  
[quoted text clipped - 20 lines]
>
>Todd
 
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.