Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a large excel spreadsheet. Within the spreadsheet are references
to word documents. These word documents are all stored in the same folder. The only difference between what the word documents are called, is a number, i.e. WORD123, WORD537, etc. I wish to make a link within the excel spreadsheet to these word documents. I know I could use hyperlinks to do this, however there are a vast quantity of links that I wish to make and it would take too long to do it this way. If I use a macro could I write a code to automatically find these word documents. Any help is really appreciated. Thanks. --- Message posted from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use the filesearch object to search the directory for "Word.doc"
and I believe it will retrieve a list of these files with their path. See help on the filesearch object. -- Regards, Tom Ogilvy "pgoodale" wrote in message ... I have a large excel spreadsheet. Within the spreadsheet are references to word documents. These word documents are all stored in the same folder. The only difference between what the word documents are called, is a number, i.e. WORD123, WORD537, etc. I wish to make a link within the excel spreadsheet to these word documents. I know I could use hyperlinks to do this, however there are a vast quantity of links that I wish to make and it would take too long to do it this way. If I use a macro could I write a code to automatically find these word documents. Any help is really appreciated. Thanks. --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
pgoodale,
You could try something like this: Dim appWD As Word.Application 'Set-up appWD Set appWD = CreateObject("Word.Application.9") 'Open M.S. Word 2000 appWD.ChangeFileOpenDirectory "C:\MywordDocs" 'Word looks here for file appWD.Documents.Open Filename="WORD" & Range("A1").Value Where A1 contains the number of the Word Doc you want to open and all your docs are in the folder C:\MywordDocs HTH Henry "pgoodale" wrote in message ... I have a large excel spreadsheet. Within the spreadsheet are references to word documents. These word documents are all stored in the same folder. The only difference between what the word documents are called, is a number, i.e. WORD123, WORD537, etc. I wish to make a link within the excel spreadsheet to these word documents. I know I could use hyperlinks to do this, however there are a vast quantity of links that I wish to make and it would take too long to do it this way. If I use a macro could I write a code to automatically find these word documents. Any help is really appreciated. Thanks. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
linking cells when embedding into Word documents | Excel Worksheet Functions | |||
Attaching documents to Excel | Excel Worksheet Functions | |||
Problem attaching with Word 2003 | Excel Discussion (Misc queries) | |||
Attaching/Embedding word documents | Excel Discussion (Misc queries) | |||
Attaching formula to cells | Excel Discussion (Misc queries) |