Currently I have a situation where I can do something like the following:
Name Surname
Address
Date
Item1 Description1 Qty1
Item2 Description2 Qty2
etc...
The first section is the header autotext and below is the details autotext.
Each autotext has its bookmarks. In my code I insert the first autotext,
replace its bookmarks with data. The loop through the details recordset,
insert the second autotext and replace bookmarks. Note that the data comes
from 2 different tabless
This works fine if everything is under each other. Now I want something
different and this time I need data that comes from 5 or 6 different tables.
To keep it simple, I need a template like the following (just an example):
Name Surname Item1 Description1 Qty1
Address Item2 Description2 Qty2
Item3 Description3 Qty3
Date
Notes1
Notes2
Notes3
etc...
This cant be achieved with my current method, so I was thinking of an
alternative method:
1. Design the template exactly as I want it to look like and store it
completely as an autotext and call it Main.
2. Individual fields will be Main's bookmarks.
3. The Items section will also be stored as an autotext and called Items.
4. Items fields will be Items' bookmarks (maybe with Item prefix, eg,
ItemName, ItemDescription, etc)
5. Do 3 and 4 for the Notes section.
6. Furthermore, add 2 bookmarks for Main and call them ItemDetails and
NotesDetails for example.
What's the reason? Well, then I can do something like this in my code:
1. Insert Main autotext
2. Replace Main's bookmarks with fields
3. At the end of the document (or preferably somewhere else), insert Items
autotext and replace bookmarks accordingly.
4. Cut from the beginning of the Items text to the end.
5. Place the text in Main's ItemDetails boomark.
6. Do the same for Notes and NotesDetails.
That's what I'm trying to achieve. I hope it's clear!!
What I still didn't figure out 100% is points 3,4,5 above.
Any suggestions?
Ivan
> G'day "Ivan Debono" <ivanmdeb@hotmail.com>,
>
[quoted text clipped - 27 lines]
>>Thanks,
>>Ivan
Doug Robbins - Word MVP - 26 Dec 2004 04:31 GMT
Assuming that the 5 or 6 tables are in a database, I would suggest that you
use an Access report to achieve what you are after.
Alternatively, see the "Multiple items per condition" item under the
"Special merges" section of fellow MVP CIndy Meister's website at
http://homepage.swissonline.ch/cindymeister/MergFram.htm

Signature
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
> Currently I have a situation where I can do something like the following:
>
[quoted text clipped - 91 lines]
> >>Thanks,
> >>Ivan
Ivan Debono - 26 Dec 2004 06:05 GMT
They are actually in an Access database and an access report will simplify
things. But I can only distribute the database and ADO and not the Access
engine, so the enduser can design his own reports.
My only alternative would be Word
Ivan
> Assuming that the 5 or 6 tables are in a database, I would suggest that
> you
[quoted text clipped - 108 lines]
>> >>Thanks,
>> >>Ivan