Imports Docs.Word Module Module1 Sub Main() ' Creates a new instance of Document class and reads a .doc file into this structure Dim Doc As New Document() Doc.ReadDoc("..\..\Data\DocumentNodes.doc") ' for each paragraph and table in document... For i As Integer = 0 To Doc.Sections(0).Nodes.Count - 1 ' Creates a new instance of Node class Dim CurrentNode As Node = Doc.Sections(0).Nodes(i) ' if it's a paragraph If CurrentNode.Type = NodeType.Paragraph Then ' Get text of paragraph and write it to console Dim Text As String = DirectCast(CurrentNode, Paragraph).Text Console.WriteLine(Text) End If ' if it's a table If CurrentNode.Type = NodeType.Table Then ' Write a message about it Console.WriteLine("This node is a table.") End If Next Console.ReadKey() End Sub End Module