Using Access to create documents

D

dklein

I am new to this so I am might be completely misunderstanding the purpose of
Access, but I was wondering if I can use Access to import a file from Excel,
and then based on a certain condition (any entry that has a date before x in
a specified column) populate Word documents. That is, for any entry that
meets that condition, the rest of the data for that entry be used to fill in
certain fields in an already created Word document. If there is a different
way to go about this task, using a different combination of Office
applications, that would be helpful too.
 
K

Ken Sheridan

I imagine it could be done straight from Excel to Word using automation, but
I'm not sufficiently familiar with the Excel object model to say how. It
could be done by using Access as the middleman, however. First you'd import
the Excel worksheet into Access as a table and then create a query based on
the table which restricts the result to those rows where the date is before
the relevant date parameter. You can then use the query to pas the data to
Word, either by merging or by filling a Word table. You'll find a file which
demonstrates various Access to Word automation operations at:


http://community.netscape.com/n/pfx/forum.aspx?msg=23781.1&nav=messages&webtag=ws-msdevapps


Unless you need the extra formatting which Word offers you could simply base
an Access report on the query, designing the report to match your Word
document, with controls bound to the columns in the query to insert the data.

Ken Sheridan
Stafford, England
 
A

Albert D. Kallal

ms-access is ideal for word mergeing.

I would suggest you:

a: import the data from excel
b: build a query with the correct date (or whetever) critea that gives you
the correct reult.
c: use that query to merge to word.

I have a nice working sample that does a merge of the current record to
word.

The sample I have can be found here:
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

What is nice/interesting about my sample is that is specially designed to
enable ANY form with ONE LINE of code....

Thus, each time you build a new form, you can word merge enable it with
great ease.

Make sure you read the instructions from above, and you should eventually
get to the follwoing page
http://www.members.shaw.ca/AlbertKallal/wordmerge/page2.html


Note that the merge can also use a query, and thus you don't have to merge
just "one" record..

After the merge occurs, you get a plain document WITHOUT any merge fields,
and this allows the end user to save, edit, or even email the document
(since the merge fields are gone after the merge occurs).

Give the above a try.
 

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