integritycare
Technical User
Hi all,
I found this code to be able to open a docx file. While it opens MS Word, it does not open the document. I have referenced Microsoft Word 12 object library.
The code I have used is this;
Any help with this code would be appreciated.
Integrity
I found this code to be able to open a docx file. While it opens MS Word, it does not open the document. I have referenced Microsoft Word 12 object library.
The code I have used is this;
Code:
Private Sub Command318_Click()
Dim wordobj As Word.Application
On Error GoTo ErrHandler
Set wordobj = GetObject(, "Word.Application")
wordobj.Application.Visible = True
wordobj.Documents.Open ("c:\test.docx")
Exit Sub
ErrHandler:
Set wordobj = CreateObject("Word.Application")
Resume Next
End Sub
Any help with this code would be appreciated.
Integrity