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 / October 2006

Tip: Looking for answers? Try searching our database.

How to Select OLEs and why does Selection.Cut & Paste resizes OLE?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joe HM - 19 Oct 2006 18:51 GMT
Hello -

I have a Word Table that contains an OLE.  The program that generated
that Word document did not resize the OLE so I can only see parts of it
in that cell.

I selected the OLE and ran a simple Selection.Cut and then
Selection.Paste macro which resized the OLE as desired.  How does this
work?  Why does Word resize the OLE?  Does it do some PasteSpecial even
though I did not specify anything?

How can I write a macro that does this to all the OLEs in that table -
i.e. how can I Select the OLEs?  I tried to get a handle on them via
Shapes but Shapes is empty for that document.  So where are the OLEs
stored?

Thanks!
Joe
Jezebel - 19 Oct 2006 23:38 GMT
OLE is a method, not a thing. (Damn those acronyms!) So the discussion
hinges on what the object actually is -- some are resizable automatically or
otherwise, some are not.

However, the short answer is that Word, when it pastes an object, sizes it
to fit its container, if that is smaller than the object's original size.
The container being whatever you're pasting it into -- usually the text
boundaries of the page, or a table cell.

Looking at the Shapes collection is a good start: if this is empty your
objects are inline, so check the InlineShapes collection. In both cases, the
collection may contain objects other than those inserted by OLE, so you need
to check the type before doing any manipulation.

> Hello -
>
[quoted text clipped - 14 lines]
> Thanks!
> Joe
Joe HM - 20 Oct 2006 12:21 GMT
Hello -

Makes sense that it is a method.  Thanks so much for you help!  D'oh...
I could have realized that they are Inline because they are in a table
cell and not floating.

Thanks again,
Joe

> OLE is a method, not a thing. (Damn those acronyms!) So the discussion
> hinges on what the object actually is -- some are resizable automatically or
[quoted text clipped - 28 lines]
> > Thanks!
> > Joe- Hide quoted text -- Show quoted text -
 
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.