Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
opening new csv file in existing xls file's worksheet Shikha Excel Worksheet Functions 4 March 2nd 09 12:56 PM
Excel 2007 blank when opening existing file Syrena Excel Discussion (Misc queries) 3 October 1st 08 03:11 AM
opening an existing file Like the morning Excel Discussion (Misc queries) 5 June 12th 08 07:41 PM
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 Steven Excel Programming 1 October 17th 05 08:56 AM
opening a word document from excel: file still won't load chris Excel Programming 2 April 1st 04 12:05 PM


All times are GMT +1. The time now is 08:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"