WD97: Returned Height for Inline Shape Different from Specified (163910)
The information in this article applies to:
- Microsoft Word 97 for Windows
This article was previously published under Q163910 SYMPTOMS
In 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
STATUS
Microsoft 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 INFORMATION
The Height property can be used to return or set the height of a specified
inline shape.
Modification Type: | Major | Last Reviewed: | 11/14/2000 |
---|
Keywords: | kb3rdparty kbinterop kbprogramming KB163910 |
---|
|