Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have some code that opens a word mail merge file from a macro within Excel. It all works fine when all the files are on my hard drive. But when I move them to our shared drive, it gives me an error. Here is the code: Sub MergeToWord() ActiveWorkbook.Names.Add Name:="MyData", RefersTo:="=Sheet1!" _ & Range(Selection, Selection.End(xlDown)).Address Shell "C:\Program Files\Microsoft office\Office11\winword.exe F:\Shared Files\...\...\wordfile.doc" End Sub The line in red is the one that is running into the error. The error message says "Word experienced an error trying to open the file." Does anyone know why this occurs? Is it possibly something with the file permissions on our shared drive? Anyone have any suggestions? Thanks, AJO -- AJO ------------------------------------------------------------------------ AJO's Profile: http://www.excelforum.com/member.php...o&userid=31286 View this thread: http://www.excelforum.com/showthread...hreadid=511855 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
opening new csv file in existing xls file's worksheet | Excel Worksheet Functions | |||
Excel 2007 blank when opening existing file | Excel Discussion (Misc queries) | |||
opening an existing file | Excel Discussion (Misc queries) | |||
copy multiple worksheets of a workbook, and paste onto a Word document ( either create new doc file or paste onto an existing file.) I need this done by VBA, Excel Macro | Excel Programming | |||
opening a word document from excel: file still won't load | Excel Programming |