Christopher Greaves |
|||
Christopher Greaves |
|||
If you are interested in applications please visit www.VBASolutions.ca .
If you are interested in end-user macros please visit www.TorontoMacros.com .
I had a need to pass data back and forth between an Excel application that searched the web, and a Word application that formatted the found text.
The Excel application was quite capable of locating text on the web and writing the text to a set of text files with extension “DOC” in a spare folder.
Word had to obtain the folder and hence the text documents, open them, and tag specific search terms known to Excel.
The problem, then, is to pass a folder name and some search terms to Word, from Excel.
We will approach this exercise backwards, as an exploratory technique:
There’s not much sense worrying about data and parameters unless we are sure we can start up Word from Excel.
So we’ll start with calling Word from Excel, then we will identify an application to be run in Word from Excel, then we will identify a subroutine in that Word application, and invoke that subroutine as a macro in Word from Excel, and then we will pass data to that subroutine to demonstrate that we can pass data to a subroutine in Word and call it from Excel.