Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I am using the following macro in excel to open a specific word document that
the excel file merges records into. Dim wdApp As Object Dim wdDoc As Object Set wdApp = CreateObject("Word.application") Set wdDoc = wdApp.Documents.Open _ (Filename:="B:\test\test.doc") The file loads in word but I get a message stating that the test.doc is read only. I don't get the error message if I open the test.doc as per normal. How can I change my macro so the document loads without being read only? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'd guess that you have a hidden instance of MSWord running.
I'd reboot the pc and try the code one more time. And I'd add: wdApp.visible = true right after the createobject line. It might make testing easier. Prohock wrote: I am using the following macro in excel to open a specific word document that the excel file merges records into. Dim wdApp As Object Dim wdDoc As Object Set wdApp = CreateObject("Word.application") Set wdDoc = wdApp.Documents.Open _ (Filename:="B:\test\test.doc") The file loads in word but I get a message stating that the test.doc is read only. I don't get the error message if I open the test.doc as per normal. How can I change my macro so the document loads without being read only? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search, Copy, Paste Macro in Excel | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
macro with F9 | Excel Discussion (Misc queries) | |||
Make Alignment options under format cells available as shortcut | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) |