Possible to automatically generate a Word file from a database?

W

wardnine

Hello! Suppose I have, in Excel, a list of book names going down the first
column and the chapter number going across the first row (e.g., cell B1 would
have a value of "Chapter 1", C1 would have a value of "Chapter 2", and so
on...). Suppose each cell within this file structure contains a 1-2 sentence
summary of the book listed in the first column and the chapter listed in the
first row. Given this Excel file (it could even be Access database or
whatever), is it possible to automatically create a Word document listing the
first book name in the Excel file, then the summary for each chapter of that
book name (this summary is always preceded by the chapter number), then list
the second book name in the Excel file, the sentence summary for each chapter
in that book, then the third book name, and so on like:

Rising Sun

Chapter 1

[Chapter Summmary]

Chapter 2

[Chapter Summary]

Huckleberry Finn

Chapter 1

[Chapter Summary]

Chapter 2

[Chapter Summary]

Is is possilbe to to take data from Excel and put it into Word like this??
Thanks for any help!
 
W

wardnine

Can you give me a general idea of how that is done? Would it require Visual
Basic programming in Word or what??

Jezebel said:
Yes, that's possible.


wardnine said:
Hello! Suppose I have, in Excel, a list of book names going down the first
column and the chapter number going across the first row (e.g., cell B1
would
have a value of "Chapter 1", C1 would have a value of "Chapter 2", and so
on...). Suppose each cell within this file structure contains a 1-2
sentence
summary of the book listed in the first column and the chapter listed in
the
first row. Given this Excel file (it could even be Access database or
whatever), is it possible to automatically create a Word document listing
the
first book name in the Excel file, then the summary for each chapter of
that
book name (this summary is always preceded by the chapter number), then
list
the second book name in the Excel file, the sentence summary for each
chapter
in that book, then the third book name, and so on like:

Rising Sun

Chapter 1

[Chapter Summmary]

Chapter 2

[Chapter Summary]

Huckleberry Finn

Chapter 1

[Chapter Summary]

Chapter 2

[Chapter Summary]

Is is possilbe to to take data from Excel and put it into Word like this??
Thanks for any help!
 
J

Jezebel

Given that you posted the question to a VBA forum, I thought you were
assuming a VBA solution. Certainly VBA is one way to do it. If the database
or spreadsheet is as cleanly formatted as you describe, you could probably
do it using MailMerge, too. Read Help on using MailMerge to create a
catalog.




wardnine said:
Can you give me a general idea of how that is done? Would it require
Visual
Basic programming in Word or what??

Jezebel said:
Yes, that's possible.


wardnine said:
Hello! Suppose I have, in Excel, a list of book names going down the
first
column and the chapter number going across the first row (e.g., cell B1
would
have a value of "Chapter 1", C1 would have a value of "Chapter 2", and
so
on...). Suppose each cell within this file structure contains a 1-2
sentence
summary of the book listed in the first column and the chapter listed
in
the
first row. Given this Excel file (it could even be Access database or
whatever), is it possible to automatically create a Word document
listing
the
first book name in the Excel file, then the summary for each chapter of
that
book name (this summary is always preceded by the chapter number), then
list
the second book name in the Excel file, the sentence summary for each
chapter
in that book, then the third book name, and so on like:

Rising Sun

Chapter 1

[Chapter Summmary]

Chapter 2

[Chapter Summary]

Huckleberry Finn

Chapter 1

[Chapter Summary]

Chapter 2

[Chapter Summary]

Is is possilbe to to take data from Excel and put it into Word like
this??
Thanks for any help!
 
E

edoco

Curious.. are you turning this forum into help file reference? Seems
that the fellow asked a reasonable question for this forum and was
clearly asking for an example. If your answer is to refer to the help
file how useful really was your reply?
Given that you posted the question to a VBA forum, I thought you were
assuming a VBA solution. Certainly VBA is one way to do it. If the database
or spreadsheet is as cleanly formatted as you describe, you could probably
do it using MailMerge, too. Read Help on using MailMerge to create a
catalog.




wardnine said:
Can you give me a general idea of how that is done? Would it require
Visual
Basic programming in Word or what??

Jezebel said:
Yes, that's possible.


Hello! Suppose I have, in Excel, a list of book names going down the
first
column and the chapter number going across the first row (e.g., cell B1
would
have a value of "Chapter 1", C1 would have a value of "Chapter 2", and
so
on...). Suppose each cell within this file structure contains a 1-2
sentence
summary of the book listed in the first column and the chapter listed
in
the
first row. Given this Excel file (it could even be Access database or
whatever), is it possible to automatically create a Word document
listing
the
first book name in the Excel file, then the summary for each chapter of
that
book name (this summary is always preceded by the chapter number), then
list
the second book name in the Excel file, the sentence summary for each
chapter
in that book, then the third book name, and so on like:

Rising Sun

Chapter 1

[Chapter Summmary]

Chapter 2

[Chapter Summary]

Huckleberry Finn

Chapter 1

[Chapter Summary]

Chapter 2

[Chapter Summary]

Is is possilbe to to take data from Excel and put it into Word like
this??
Thanks for any help!
 
J

Jezebel

edoco said:
Curious.. are you turning this forum into help file reference? Seems
that the fellow asked a reasonable question for this forum and was
clearly asking for an example. If your answer is to refer to the help
file how useful really was your reply?

Entirely. Using Mailmerge to solve the problem will be heaps quicker than a
VBA solution. He asked 'VBA or what?' -- to which the correct answer was,
and is, 'or what'.
 

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