That sort of worked. The Documnet I am trying to open is
a mail merge document and the first message that comes up
is that the Word document is read only as it is being used
by another user - it isn't and then it is opening a second
data base. Evenutally after clicking cancel to all
messages it does open the file - correct data and all and
I can change the document and print it but can't save it
as it is read only.
It there any way around these problems.
I really appreciate your prompt reply and being able to
get help in this way.
-----Original Message-----
Hi Pauline
You're on the right track. You need to add:
Dim oDoc as Object
' (or As Word.Document if you have a reference to the Word object library)
Set oDoc = oApp.Documents.Open("C:\MyFolder\MyFile.doc")
--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand
Return mail address is invalid in a vain attempt to reduce spam.
Feedback is welcome at: (e-mail address removed)
Please post new questions or followups to newsgroup.
Pauline C said:
I want to open a word document from a button on a form. I
can open MS Word but can't open the file I want.
This is my code so far:
Dim oApp As Object
Set oApp = CreateObject("Word.Application")
oApp.Visible = True
Can anyone tell me help me?
Thaning you,
Pauline
.