M
Matthew McManus
Can anyone provide me with some code for a macro to open a wor
document.
I have excel2000, and word 2000, running on xp.
I have tried what has been suggested previously, something like:
Sub WDTest()
Dim WD as Object
Set WD = CreateObject("Word.Application")
WD.Documents.Open "C:\My Documents\WordDoc.Doc"
End sub
but this has caused me many problems. I get the error message tha
"WordDoc.doc" has been locked for editing by me. I have tried it on
number of otherwise fine documents (before I run this macro, I coul
open them normally) After I have run the macro I can't access the
again unless I reboot. The same applies to the excel document I a
trying to run the macro from. Also I frequently get the error messag
that I need to close Microsoft Word/Excel, but it doesn't seem to b
open - again I need to reboot to fix the problem.
Any ideas would be greatly appreciated.
Matthe
document.
I have excel2000, and word 2000, running on xp.
I have tried what has been suggested previously, something like:
Sub WDTest()
Dim WD as Object
Set WD = CreateObject("Word.Application")
WD.Documents.Open "C:\My Documents\WordDoc.Doc"
End sub
but this has caused me many problems. I get the error message tha
"WordDoc.doc" has been locked for editing by me. I have tried it on
number of otherwise fine documents (before I run this macro, I coul
open them normally) After I have run the macro I can't access the
again unless I reboot. The same applies to the excel document I a
trying to run the macro from. Also I frequently get the error messag
that I need to close Microsoft Word/Excel, but it doesn't seem to b
open - again I need to reboot to fix the problem.
Any ideas would be greatly appreciated.
Matthe