Private Sub EntityTypeExample()
' This example returns the EntityType property for drawing entities.
Dim ents As Object
Dim ent As Object
Dim ct As Integer
Set ents = ActiveDocument.ModelSpace
ct = ents.Count
MsgBox "No. of entities = " & ct
Set ent = ents.Item(ct)
MsgBox "The EntityType property for the last entity is: " & ent.EntityType
End Sub