Opening a Word Doc
See if:
ActiveWorkbook.FollowHyperlink Address:="C:\test\DataDoc.doc"
or
x = Shell("cmd.exe /c C:\test\DataDoc.doc", 1)
behave any better.
--
Gary''s Student - gsnu2007k
"Little Penny" wrote:
I have a MS Word document that is merged with and excel spread sheet.
When I open the word doc (double click) I get the following message:
Opening this document will run the following SQL command
SELECT*FROM 'Data$'
Data from your database will be placed in the document Do you want to
continue y or n
Which is what I want.
But if I use a macro from Excel to open the Word doc
oWord.Documents.Open "C:\test\DataDoc.doc"
It does not run the SQL command.
Am I doing something wrong?
Thanks
Little Penny
|