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 / April 2007

Tip: Looking for answers? Try searching our database.

Word 2007 inlineshape scalewidth property always returns 0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eerik.lehto@gmail.com - 20 Apr 2007 11:59 GMT
Hi all,

I have some macros to add and adjust images to word documents. The
problem is that I want to scale picture by using percentage values,
but if I'm trying to check the current value of scalewidth or
scaleheight in Word 2007, the property always returns 0. The same
macro works perfectly in Word 2000, XP and 2003. Here is an example
code:

'to try this, you must have a document containing images
Sub Testmacro
   ActiveDocument.InlineShapes(1).Select
   MsgBox (Str(Selection.InlineShapes(1).ScaleHeight))
End Sub

In other versions of Word, the message box returns the scaling
percentage (ie. 100) but in Word 2007 you always get 0. Is this a bug
in Word 2007?

Kind Regards,

Eerik Lehto
Systems Engineer
Pöyry Forest Industry Oy, Finland
Perry - 25 Apr 2007 22:16 GMT
> In other versions of Word, the message box returns the scaling
> percentage (ie. 100) but in Word 2007 you always get 0. Is this a bug
> in Word 2007?

Nope, no bug; works great here ...
:-)

Pls supply addtl info ...

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

Hi all,

I have some macros to add and adjust images to word documents. The
problem is that I want to scale picture by using percentage values,
but if I'm trying to check the current value of scalewidth or
scaleheight in Word 2007, the property always returns 0. The same
macro works perfectly in Word 2000, XP and 2003. Here is an example
code:

'to try this, you must have a document containing images
Sub Testmacro
   ActiveDocument.InlineShapes(1).Select
   MsgBox (Str(Selection.InlineShapes(1).ScaleHeight))
End Sub

In other versions of Word, the message box returns the scaling
percentage (ie. 100) but in Word 2007 you always get 0. Is this a bug
in Word 2007?

Kind Regards,

Eerik Lehto
Systems Engineer
Pöyry Forest Industry Oy, Finland
 
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.