generating ms-word documents from excel

S

shishi

Hi all,


I have worked on an excel project recently. The goal was to assort
couple of tables from one sheet to another to make things easier for
comparison. Now I have a new task. I need to generate couple of ms-word
documents from this excel sheet. The
plan right now is to have a menuitem like "Generate docs" in excelsheet
and by clicking on that we can generate about 40 word documents or so.
We have a word template file. For each word document we need to have
the folowing things
1. Module name as the heading
2. Description of the module
3. Table of data
All these information are in the excel sheet. They are stored in excel
sheet using named ranges. Now, I need to gather these data and generate
the word docs. What would be the best approach to solve this problem.
Ideally we would like to do this with out even opening the word
application. I am requesting your valued suggestions on this problem.


Thanks in advance,
shishi
 
C

Cindy M -WordMVP-

Hi Shishi,

(see below)
I have worked on an excel project recently. The goal was to assort
couple of tables from one sheet to another to make things easier for
comparison. Now I have a new task. I need to generate couple of ms-word
documents from this excel sheet. The
plan right now is to have a menuitem like "Generate docs" in excelsheet
and by clicking on that we can generate about 40 word documents or so.
We have a word template file. For each word document we need to have
the folowing things
1. Module name as the heading
2. Description of the module
3. Table of data
All these information are in the excel sheet. They are stored in excel
sheet using named ranges. Now, I need to gather these data and generate
the word docs. What would be the best approach to solve this problem.
Ideally we would like to do this with out even opening the word
application.
Word has no "data interface" like Excel or Access do. You can only do
this without opening the Word application if you

1. Have Word 2003 and generate a WordProcessingML (XML) file or generate
Word's "private" HTML file format. The first can be opened only in Word
2003 (where it can be saved as a normal *.doc file). The second can be
opened in Word 2000 or later (but you'd have to make sure you don't use
anything that's not available in an earlier version).

2. Traditionally, such a report would be created using Word automation
(running Word). One would create a new file from the template, and plug
the data in at specified locations. These locations are usually indicated
using bookmarks. You put the information into a bookmark range, and if it
needs further manipulation (formatting), you work with the range.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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