Open Word

  • Thread starter Thread starter David W
  • Start date Start date
D

David W

how do you check for an existing document in Word 2003 from a command button
then if it is present open it?
 
If you know where the document should be, you can use the Dir() function to
check whether it's there.
If you just want to open it in word, look at ShellExecute.
 
Hi David.

Set WD = CreateObject("Word.Document")
myDoc = CurrentProject.Path & "\XY.doc" -if it's in the same folder
otherwise write full path

Set DC = Word.Documents.Add(myDoc , , , True)
DC.ActiveWindow.Visible = True

Cheers,
Gina
 

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

Back
Top