macro to get data from excel to word

C

crazyfisher

Dear all,
I have a series of contact data which I need to get into each client letter,
how to write a code to enable me to do that? I have known how to get data
from text files to generate the multiple files, but how can I do that from an
excel worksheet?
Some people say early binds and late binds, but it looks really difficult
for me, what is an easier alternative?
thanks very much!!!
 
J

Jay Freedman

crazyfisher said:
Dear all,
I have a series of contact data which I need to get into each client
letter, how to write a code to enable me to do that? I have known how
to get data from text files to generate the multiple files, but how
can I do that from an excel worksheet?
Some people say early binds and late binds, but it looks really
difficult for me, what is an easier alternative?
thanks very much!!!

The best way is by not writing any code at all. Use Word's built-in mail
merge tools, with the Excel worksheet as the data source.

Graham Mayor has a number of articles about mail merge at
http://www.gmayor.com/Word_pages.htm, and there are more articles at
http://word.mvps.org/FAQs/MailMerge/index.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
C

crazyfisher

Thanks very much ! Jay.
The webistes are awesome!, but I still want to know if there is any code for
that....because this is my school assignment :(:(
Is it really hard to extract data from excel ( or even a table in a word
document) as input?

regards!
 
J

Jay Freedman

If you'd said at the beginning that you were doing a school
assignment, I would have gently explained that we try not to do
people's homework for them -- you're supposed to learn by doing, and
your education won't be furthered if I hand you a solution. Hasn't
your instructor discussed how to get started?

There's some sample code at
http://www.word.mvps.org/FAQs/InterDev/ControlXLFromWord.htm and
http://www.word.mvps.org/FAQs/InterDev/XLToWordWithDAO.htm, and you
may be able to adapt some of that for your assignment.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top