I think there's an error in your code. I believe:
"Care Plan System\"
should be:
"\Care Plan System\"
You probably also don't need:
ChangeFileOpenDirectory "M:\Care Plan System\"
which can be replaced by:
myfilename = "M:\Care Plan System\Care Plan System\" + myfilename
There also doesn't seem to be any point in having '& myfilename' in:
InputBox("Enter file name for document " & myfilename)
as 'myfilename' is empty when the InputBox runs.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|