''
'' This code is part of Document Solutions for Word demos.
'' Copyright (c) MESCIUS 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 DsWord.
'' 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")
doc.Load(path)
'' Add a note at the end of the document:
doc.Body.Paragraphs.Add($"Loaded into DsWord on {Util.TimeNow():R}.")
'' Done:
Return doc
End Function
End Class