// For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-.NET Document doc = new Document(); Shape shape = new Shape(doc, ShapeType.TextBox); TextBox textBox = shape.TextBox; if ((textBox.Next != null) && (textBox.Previous == null)) { Console.WriteLine("The head of the sequence"); } if ((textBox.Next != null) && (textBox.Previous != null)) { Console.WriteLine("The Middle of the sequence."); } if ((textBox.Next == null) && (textBox.Previous != null)) { Console.WriteLine("The Tail of the sequence."); }