HelloWorld.vb
''
'' This code is part of GrapeCity Documents for Word samples.
'' Copyright (c) GrapeCity, Inc. All rights reserved.
''
Imports GrapeCity.Documents.Word

'' One of the simplest ways to create a "Hello, World!" DDCX.
Public Class HelloWorld
    Function CreateDocx() As GcWordDocument
        ' Create a new Word document:
        Dim doc As New GcWordDocument()
        ' Add a paragraph with the "Hello, World!" text to the first section:
        doc.Body.Sections.First.GetRange().Paragraphs.Add("Hello, World, from GcWord and VB.NET!")
        ' Done
        Return doc
    End Function
End Class