txt-bestand samenvoegen

Status
Niet open voor verdere reacties.

wilbert1967

Gebruiker
Lid geworden
19 jun 2004
Berichten
629
Ik heb een txt bestand met 63 velden komma gescheiden velden. Dit wil ik als data-samenvoegdocument gebruiken maar in word heb je veldnamen nodig. Hoe moet ik nu verder.
 
Hai, :D

Dan moet je in de bovenste regel in het tekstbestand de kolomnamen toevoegen comma-gescheiden!

Zie voorbeeld! :thumb:
 

Bijlagen

Hai, :D

Voor samenvoegen moet het bestand aan bepaalde regels voldoen!

Dus dan zul je de output (Txtbestand) nog eens onder de loep moeten nemen...hoe komt deze tot stand? (lijkt mij dat hier met automatisering ook nog wel iets te regelen is)

See Yah! :thumb:
 
Hoi

Ik begrijp dat je het TXT bestand wilt gebruiken om te gaan "samenvoegen" in Word. Ik zou het bestand dan eerst in Excel importeren met scheidingsteken "," (komma) en dit bestand opslaan als een excel bestand. Daarna het excel bestand laten samenvoegen met je Word document.

Peter
 
Hai Peter, :D

Dat is inderdaad ook een idee.
Maar ik vraag mij af waar dat txt bestand gegeneerd wordt?

Of je hangt het samenvoegdocument gelijk aan die BronDatabase of je laat die database het txtbestand zodanig maken dat het geschikt is voor samenvoegen..

See yah! ;)
 
Joost,

Wat de basis is voor voor het bronbestand maakt eigenlijk niet zoveel uit. Zolang het maar in Excel is te importeren en op de juiste wijze weg te schrijven om te mailmergen.

Peter
 
Geplaatst door marina_peter
Joost,

Wat de basis is voor voor het bronbestand maakt eigenlijk niet zoveel uit. Zolang het maar in Excel is te importeren en op de juiste wijze weg te schrijven om te mailmergen.

Peter
Hai Peter, :D

Dit is niet correct!

Als zoals in dit geval geen kolomhoofden zijn gedefineerd dan zul je deze niet Correct kunnen samenvoegen!

Wat je dan krijgt is dat Word de eerste regel van het gegevensbestand omzet in kolomhoofden en ben je die data dus kwijt..

En voor de rest kun je Word zowat aan iedere gegevensdrager hangen welke er bestaat zolang deze maar een scheidingsteken kent..(zeker met de komst van ADO)

See Yah! ;)
 
de oplossing is:

Deciding when to use a separate header source
When to use a header source In most cases, you'll probably want to list the data field names in a separate header record at the beginning of your data source. However, you may want to include the field names in a separate header source in the following cases:

- When you use several data sources. By using a single header source, you won't have to repeat or change the header record in each data source, or change the merge field names in the main document.

- When a data source doesn't contain a header record, or when field names in the header record don't match the merge field names in the main document. If you can't add or edit a header record in the data source (for example, because the data source is read-only), you can use a separate header source that contains the field names you want.

Rules for using a header source When you use a separate header source, keep the following rules in mind:

Include the same number of field names in the header source as there are data fields in the data source.

List the field names in the header source in the same order as the corresponding information in the data source.

If both the header source and the data source are stored in a text file, use the same character (either a tab character () or a comma) to separate the data fields in the header source and data source.

If you've already inserted merge fields in the main document, use the same field names in the header source. If the field names and merge fields don't match, change the field names in the header source or replace the merge fields in the main document.
---

Use a separate header source
Learn about using a separate header source.

Make sure that you’ve already set up the main document and selected a data source.
Learn about setting up a mail merge.

If you don't see the Mail Merge Helper dialog box, click anywhere in the main document, and then click Mail Merge on the Tools menu.


Under Data source, click Get Data, and then click Header Options.


Open or create a header source.
Note If you have an existing data source that contains a header record, you can use it as a header source. Microsoft Word will ignore the data records in the data source, and use only the header record as the header source.

---
Met dank aan

Femda PC-applicaties en consultancy B.V.
Frits W. Egmond

iedereen bedankt voor hulp
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan