Re: mailmerging multiple tables from access in one word-document: how?
From: John Nurick (j.mapSoN.nurick_at_dial.pipex.com)
Date: 12/12/04
- Next message: John Nurick: "Re: exporting to Excel"
- Previous message: Transferrring to foxpro: "export data from access to foxpro"
- In reply to: svdh: "mailmerging multiple tables from access in one word-document: how?"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: mailmerging multiple tables from access in one word-document: how?"
- Reply: anonymous_at_discussions.microsoft.com: "Re: mailmerging multiple tables from access in one word-document: how?"
- Reply: svdh: "Re: mailmerging multiple tables from access in one word-document:"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 12 Dec 2004 10:30:14 +0000
Hi Stefan,
Responses inline.
On Sat, 11 Dec 2004 13:59:01 -0800, "svdh"
<svdh@discussions.microsoft.com> wrote:
>I have been looking at a problem the entire week in access, I have still not
>been able to find a solution. Hope that you could maybe tell where to look
>
>Concerns the link between Access and Word. I can not transfer a report to
>word without losing out on the lay-out (RTF format). I understand that there
>is no way out
See http://www.lebans.com/ReportUtilities.htm
If what you need is a well-structured Word document (i.e. making
consistent use of styles) rather than a well-formatted one, this is an
approach that I have been intending to investigate:
1) Install the Windows Generic/Text Only printer driver.
2) Set up the report (and subreports if any) without page or character
formatting, but with XML tags corresponding to your Word styles. Most of
the tags would be inserted by including them in calculated fields, but
they could also be included in labels.
3) Print the report to a file.
4) Import the XML into Word.
>ok, mail merge I thought. But here I have the problem that I need to merge
>multiple tables and that I can just include one in the mailmerge within word.
>A query would seem likely but there I have a problem. I have one master table
>containing personal information on staff and 8 subtables around the master
>table with specifying language, workexp, education for each person. The
>number of entries in the subtables varies per person.
>
>In case I use a query to combine all these tables I get # x # x # x # x# (9
>times) number of records an extreme number of records for each person.
>
>An example: person A
>knows 8 languages
>has 3 educational references
>10 publications
>took 8 courses in his career
>
>This would already result in 1 X 8 X 10 X 8 = 640 records
>
>Do I miss a certain function with queries or how can I work this out? I can
>not imagine that it is not possible
There's no really elegant way of doing this because Word mailmerge
doesn't allow for an equivalent of sub-queries and sub-reports.
Depending on the needs, you might be able to use a custom VBA function
in your query to (for example) pull concatenate 8 languages into a
single string returned by your query. There are concatenate functions at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane and
http://www.mvps.org/access
Otherwise, it's a matter of writing VBA code that uses Automation to
control Word and create the document just as you need it. See e.g.
ACC: Sending the Current Record to Word with Automation
http://support.microsoft.com/?id=209976
Access a database and insert into a Word document the data that you find
there: http://www.word.mvps.org/faqs/interdev/GetDataFromDB.htm
ACC: Using Automation to Create and Manipulate an Excel Workbook
http://support.microsoft.com/?id=142476
-- John Nurick [Microsoft Access MVP] Please respond in the newgroup and not by email.
- Next message: John Nurick: "Re: exporting to Excel"
- Previous message: Transferrring to foxpro: "export data from access to foxpro"
- In reply to: svdh: "mailmerging multiple tables from access in one word-document: how?"
- Next in thread: anonymous_at_discussions.microsoft.com: "Re: mailmerging multiple tables from access in one word-document: how?"
- Reply: anonymous_at_discussions.microsoft.com: "Re: mailmerging multiple tables from access in one word-document: how?"
- Reply: svdh: "Re: mailmerging multiple tables from access in one word-document:"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|