Open a MS Word document from Access

K

Ky-Thuan

Hi,

Does anyone know the VBA code that allows to open a Word
document located in a specific directory?

Many thanks in advance

KT
 
M

May

You may do it in the properties -- > hyperlink address or
go to Tools and References to Register the MS Word first
then

Private Sub Open_Word_Click()
Dim wks As Word.Document
Set wks = GetObject("c:\xxx.doc")
wks.Parent.Visible = True
set wks=nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top