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

'' This sample shows how to load an existing DOCX file into GcWord.
'' It also appends a short note to the end of the loaded document.
public class LoadDocx
    Public Function CreateDocx() As GcWordDocument
        Dim doc = New GcWordDocument()

        '' Load an existing DOCX file:
        Dim path = System.IO.Path.Combine("Resources", "WordDocs", "JsFrameworkExcerpt.docx")

        '' Add a note at the end of the document:
        doc.Body.Paragraphs.Add($"Loaded into GcWord on {DateTime.Now}.")

        '' Done:
        Return doc
    End Function
End Class