macro to import excel data into word text

K

Kenneth

Ok,
I would greatly appreciate any help with my situation. I have an excel
spreadsheet containing data for many electrical devices. The first
column in the spreadsheet contains the name of the device with the
following columns containing data for that respective device. So, each
row in the spreadsheet pertains to one electrical device.
Now, in Word I have to create a report using this excel spreadsheet
data. Because the devices are similar, I have created a paragraph in
Word with bookmarks at the locations where I want to import the excel
data for each device. Each paragraph in the report will pertain to only
one electrical device in the spreadsheet (therefore, each paragraph
will access one row of data in excel). I would like to create a macro
that I can run in Word, that will prompt me for the name of the device
and based on the input, it will generate the paragraph template with
that device's respective data. Some bookmarks I have created have names
like, devicename, amps, voltage, growthrate, transformer. Has anyone
done something similar before or know how to do this? Again, any help
would be great.

Thanks,
Kenneth
 
J

Jezebel

MailMerge will do this. Read Help on creating a catalog: it's almost exactly
as you describe -- set up the 'template paragraph' for one entry, with
mailmerge fields for each item of data, corresponding to the column headings
in the spreadsheet.
 
K

Kenneth

Jezebel,
Thanks for your reponse. However, I'm having trouble getting it to
work. It works great for the excel data that's located in the active
worksheet, but I have data in excel over multiple worksheets. I haven't
figured out how to get the mail merge to look at multiple worksheets.
Is this possible?

Kenneth
 
K

Kenneth

Jezebel,
It seems like the mail merge also assumes that your data in excel
begins in the left most column and top row. This isn't the case for me
as I have a sheet title above the data. Any thoughts on how to get
around this?

Kenneth
 
D

Doug Robbins - Word MVP

Add another sheet to the work book that references only the cells containing
the heading row and the data.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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