![]() |
Opening an existing Word File from within Excel
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 |
All times are GMT +1. The time now is 12:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com