Export rows of table to searate txt or doc files

  • Thread starter Thread starter nodiseos
  • Start date Start date
N

nodiseos

I have an access table that contains rows of data.
I would like to create a separate word doc from each row.

The clomuns are subject,number,info

I would love the title of each to be "<Number>-<Subject>" with the
content of the doc itself made up from the Info row.

Is there a way to do this - I know a bit of perl but was hoping for an
easy solution.......
 
Have you considered doing a mail merge in Microsoft Word? The following KB
articles provide more information.

http://support.microsoft.com/default.aspx?scid=kb;en-us;212329
http://support.microsoft.com/default.aspx?scid=kb;en-us;840975

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I have an access table that contains rows of data.
I would like to create a separate word doc from each row.

The clomuns are subject,number,info

I would love the title of each to be "<Number>-<Subject>" with the
content of the doc itself made up from the Info row.

Is there a way to do this - I know a bit of perl but was hoping for an
easy solution.......
 
Absolutely, just like David said, do a mail merge in Word! Your use of
Access is perfect for your needs in completing this project. Each table row
is a record. When you do the mail merge, you simply plug in the fields from
the database within the document where you want the data to go. For example,
place the info field within the body of the document where you want it.

Let me know if you need more help.

/RA
(e-mail address removed)
 
This works absolutely great except for the last step. It only allows
me to print all the letters. I would like to save each one with the
file name of the value one of the fields in the access db. How to do
this?
 
You'll probably need to change your approach to do that. To my
recollection, Word's Merge creates a single output document.

What I suggest is that you use Automation to get the job done. It's
no more complicated than the merge but it's arcane. You can use
Access as the client and Word as the called server and easily get done
what you want.

Look in Access help for "Automation". It may give you a clue and not
much more than that. In essence, learn how to do the Word programming
by practicing in Word. When you think you have a handle on it then
bring your code over to Access making appropriate changes.

It may seem complicated but it isn't. It simply isn't documented as a
mainstream kind of thing to do. The fact that you find yourself in
this situation once is a pretty good indicator that you will need a
similar solution in the future.

FWIW I've done an application wherein all of the data is stored in
Access and each main record (row) is used to create a new Word
document with a name encoded from some of the data.

HTH
 
Back
Top