Hi Jim, (posted to microsoft.public.excel.misc
You are referring to code on the web pages of Ole P. Erlandsen,
which you found from links on my page.
http://www.mvps.org/dmcritchie/excel/mailmerg.htm
Sorry I just use Mail Merge manually, and by automating you were,
of course, interested in macros for automating use of MS Word and
Excel together. Probably more in the domain of Word
Developers. Did you check the comments within the code
from Ole's pages.
http://www.erlandsendata.no/english/vba/ole/controlword.htm
From the VBE (Visual Basic Editor)
Tools, References,
[x] Microsoft Word 9.0 Object Library -- for my Excel 2000
You would have to change for the comparable earlier library, probably
Microsoft Word 8.0 Object Library -- for your Excel 97, perhaps
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages:
http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:
http://www.mvps.org/dmcritchie/excel/search.htm
JimPNicholls said:
David
I've had a look at your website and found the section detailing
how to control Word from Excel. I've used the following example code:
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Dim i As Integer
I'm using Excel 97 and it doesn't give you the "Word.Application" option. When I try to debug it a message appears saying that
it's not a defined command. Is this something that I'm doing wrong?