1 Reply Latest reply on Sep 8, 2015 2:06 PM by Peter Spier

    The rectangle object cannot be found

    derongwang?@deltek.com

      I have the following code to find locate a rectangle object in between the text range

       

       

              Dim myStartCharacter As Object = objGraphicInfo.BeginTag.Characters.Item(-1)

              Dim myEndCharacter As Object = objGraphicInfo.EndTag.Characters.Item(1)

              Dim myText As Object = myEndCharacter.ParentStory.Texts.ItemByRange(myStartCharacter, myEndCharacter).Item(1)

       

       

              If myText.Rectangles.count  sometimes return 0  and sometime return 1 although there is a rectangle in between.  So the code does not work consistently. Does anybody know why?

       

      Thanks a lot!