25-03-23, 12:37 AM
كود :
Imports Microsoft.Office.Interop.Word
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'Create an instance of Microsoft Word
Dim app As New Application()
'Open a Word document
Dim doc As Document = app.Documents.Open("C:\path\to\your\word\file.docx")
'Make the Word window visible
app.Visible = True
'Activate the document
doc.Activate()
'Release the resources
doc = Nothing
app = Nothing
End Sub
End Class
