E
eerik.lehto
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
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