D David W Mar 20, 2005 #1 how do you check for an existing document in Word 2003 from a command button then if it is present open it?
how do you check for an existing document in Word 2003 from a command button then if it is present open it?
M MacDermott Mar 20, 2005 #2 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.
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.
G Gina Mar 21, 2005 #3 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
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