Word .NET > Tutorial > Get all content elements

The example shows you how to use method GetContentElements. The GetContentElements method recursively retrieves all elements contained inside content of one element. All classes implement the IContentElement (like WordDocument, Paragraph, Run, Text, Table, ...) have GetContentElements method. It is different than Content property. The Content property contains "first level" elements. In this example we retrieve all hyperlinks from a document.

C# example
VB example