User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion
Register FAQ Members List Calendar Arcade Today's Posts

Reply
Thread Tools Display Modes
Unread 15 Feb 2003, 11:26   #1
BuddhistPunk
Registered User
 
Join Date: Apr 2002
Location: Leeds, but looking for a way to escape
Posts: 128
BuddhistPunk is an unknown quantity at this point
Word & Mail Merge

Not really programming as such, but I do need to do this within an application I am putting together.

Does anybody have any experience of doing, what seems to be, complex Mail Merging using Word (97, 2K or XP)??

To explain what I am trying to do :

My mail merge document is made up of two parts :

1) Various standard mail merge fields populated from a standard CSV file (this file only has data for one document)

2) A table that will have n rows that is populated from a second csv file (n being the number of entries in that CSV)

The CSV files have the following format

Code:
csv1 - Standard Data
F1, F2, F3, F4, F5
Value1, Value2, Value3, Value4, Value5

csv2 - Table Data
Column1, Column2
Col1_row1_value, Col2_row1_value
Col1_row2_value, Col2_row2_value
Col1_row3_value, Col3_row3_value
To try and make that a little clearer, I have a document template with a format similar to this :

Code:
Field 1 : <<F1>>
Field 2 : <<F2>>
Field 3 : <<F3>>

Table 1
| <<Column1>> | <<Column2>> |

Field 4 : <<F4>>
Field 5 : <<F5>>
So if I was to merge the 2 CSV files with the template above I would end up with this :

Code:
Field 1 : Value1
Field 2 : Value2
Field 3 : Value3

Table 1
 | Col1_row1_value | Col2_row1_value |
 | Col1_row2_value | Col2_row2_value |
 | Col1_row3_value | Col2_row3_value |

Field 4 : Value4
Field 5 : Value5
For the sake of a professional finish (and other reasons) I need the table to cut off when there is no data left to merge, i.e. I dont have a pre-formed table with say 20 rows and only 3 rows of data - the problem being that the number of rows of data is highly variable.

Does this make sense??
__________________
SELECT everything FROM everywhere WHERE something = something_else;
> 42
BuddhistPunk is offline   Reply With Quote
Reply



Forum Jump


All times are GMT +1. The time now is 00:46.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018