Discussion Locked

Word from Access

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have constructed a Word file which drags data from an Access table. I now want to open the file from VBA in Access so that the user can print the labels in the Wrod file. I cannot find information on the methods of the Word Application object type. I have been trying to emulate some code which opens an Excel file, but it seems that there is not enough symmetry.
' here starts attempt to open a Word file
Dim ReturnAddressFile As Word.Application
Set ReturnAddressFile = CreateObject("Word.Application")
With ReturnAddressFile
.Visible = False
.Activate
.

.Open "Labels4"
.Visible = True
End With
Exit Sub
' here ends attempt to open a Word file
"Open" is not recognized. What do I need to code?

3 replies

by jackofalltech

Go to M$ site and search for AUTO97.HLP. It explains all the automation stuff for Office 97, almost all of which still applies no matter what version you have.

Ralph

by john_wills

Someone outside TechRepublic had already shown me a practical way to do what I needed to do, but this document seems very valuable.

This discussion is closed to new replies.