How to open existing word document in vb.net

 

This example shows how to open an existing word document in vb.net.
Add reference of ‘Microsoft.Office.Interop.Word’ in your project.
This code example requires a document named Test.docx must exist in a D: drive.

Code Sample :

Private Sub OpenWordDocument()
        Dim objWord As Word.Application
        Dim objDoc As Word.Document
        objWord = CreateObject("Word.Application")
        objDoc = objWord.Documents.Open("D:\Test.docx")
        objWord.Visible = True
End Sub