WD97: Returned Height for Inline Shape Different from SpecifiedLast reviewed: February 11, 1998Article ID: Q163910 |
The information in this article applies to:
SYMPTOMSIn Visual Basic for Applications, when you create an InlineShape object and set the height using the Height property, the value returned by the Height property for the shape does not equal the value used to set the height. For example, the following Visual Basic for Applications macro creates a Microsoft Excel worksheet object. The macro sets the height of the object to 200 points. However, when the Height property is used in its functional form to return the height of the object, the value returned equals 200.25 points.
Sub GetObjectHeight() Dim oILShp1 As Object ' Create the object Set oILShp1 = ActiveDocument.InlineShapes.AddOLEObject _ (ClassType:="Excel.Sheet.8", DisplayAsIcon:=False, _ Range:=ActiveDocument.Paragraphs(1).Range) ' Set the object height oILShp1.Height = 200 ' Return the object height. MsgBox oILShp1.Height End Sub STATUSMicrosoft has confirmed this to be a problem in the products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe Height property can be used to return or set the height of a specified inline shape.
Keywords : kb3rdparty kbinterop kbole kbprg kbwordvba Version : 97 Platform : WINDOWS |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |