samenvoegen records op dezelfde pagina

Status
Niet open voor verdere reacties.

slageweg

Nieuwe gebruiker
Lid geworden
22 apr 2008
Berichten
3
Beste mensen,

Voor het versturen van herinneringen tbv de administratie (openstaande vorderingen) wil ik gebruik gaan maken van Excel en Word (2007). Momenteel heb ik namelijk in Excel een overzicht van alle openstaande vorderingen. Deze zijn weergegevn in kolommen (Naam, Adres, Factuurnummer, Bedrag, etc.). Dit excel bestand wil ik in Word gebruiken om automatisch herinneringen te genereren dmv "verzendlijsten --> samenvoegvelden invoegen" in Word. Dit is gelukt in een kleine test, maar nu wil ik meerdere records samenvoegen op 1 pagina. Er kunnen namelijk meerdere facturen openstaan onder 1 naam (klant). In Excel zijn deze terug te vinden in meerdere rijen (1 rij per openstaande vordering). Op het Internet heb ik al enige informatie gevonden over dit probleem:

SUMMARY
In Microsoft Word, you can merge a conditional number of records to the same page.

MORE INFORMATION
To merge a conditional number of records to the same page, use a combination of SET, IF, and NEXTIF fields. For example, you can use this method to merge all records with the same name to one page in the merge and create a new page in the merge when a new name is encountered in the data file.

The following example uses a data file with employee names (Employee) and projects they are working on (Projects). The Check field is used in the data file to mark the last record of a particular name.

Sample Data File:

Employee-----------Project----------Check
Scott Cooper-------4578j---------------
Scott Cooper-------86785x------------
Scott Cooper-------543p----------------1
Meng Phua----------87x-----------------
Meng Phua----------89976m-----------1
Kim Yoshida--------7897r--------------
Kim Yoshida--------857t----------------
Kim Yoshida--------78974x-----------
Kim Yoshida--------7868p--------------1

Set up the main document as follows, with a copy of the conditional statements equal to the maximum number of projects for each employee (four in the above example). Employee Project
{MERGEFIELD Employee} {MERGEFIELD Project}{set duplicate {if
{MERGEFIELD Check}="1" "off" "on"}}{nextif {mergefield check}=""}{if
{duplicate}="on" "P
t{MERGEFIELD Project}"}{set duplicate {if {MERGEFIELD Check}="1"
"off" "on"}}{nextif {mergefield check}=""}{if {duplicate}="on" "P
t{MERGEFIELD Project}"}{set duplicate {if {MERGEFIELD Check}="1"
"off" "on"}}{nextif {mergefield check}=""}{if {duplicate}="on" "P
t{MERGEFIELD Project}"}{set duplicate {if {MERGEFIELD Check}="1"
"off" "on"}}{nextif {mergefield check}=""}{if {duplicate}="on" "P
t{MERGEFIELD Project}"}

Where "P" represents a paragraph mark that pushes the next project to a new line, and "t" represents a tab character that aligns the next project under the previous project.

The resulting merge document appears as follows:
Employee-------------Project
Scott Cooper--------4578j
---------------------------86785x
---------------------------543p
--- Page Break ---
Meng Phua----------87x
---------------------------89976m
--- Page Break ---
Kim Yoshida---------7897r
----------------------------857t
----------------------------78974x
----------------------------7868p


Als ik kijk naar de gebruikte veldcodes komen deze mij niet geheel bekend voor, met name "set duplicate". Mijn vraag is hoe ik de records, zoals in het voorbeeld genoemd, toch kan samenvoegen op 1 pagina. In andere woorden, hoe ziet de code er uit in Word 2007 en welke veldcodes moeten er voor worden gebruikt.

Bij voorbaat dank voor jullie medewerking!

Sander
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan