Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Attaching cells to word documents

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Attaching cells to word documents

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Attaching cells to word documents

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
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
linking cells when embedding into Word documents Buck Jeppson Excel Worksheet Functions 0 February 26th 10 04:03 AM
Attaching documents to Excel Xt Excel Worksheet Functions 1 November 21st 09 07:47 PM
Problem attaching with Word 2003 Desiree Excel Discussion (Misc queries) 2 July 14th 08 09:41 PM
Attaching/Embedding word documents Mike D. Excel Discussion (Misc queries) 0 July 10th 07 04:32 PM
Attaching formula to cells grahammal Excel Discussion (Misc queries) 5 March 9th 06 04:31 PM


All times are GMT +1. The time now is 02:27 PM.

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"