combining letters with an adress database

2001-06-06 Thread Martin Hansen

Is it possible to combine letters with an address database, so that i 
get ex. 10 letters where only the 'to address' is different?
I can't find anything in the documentation, about this.
My lyx version is 1.1.5fix1.

NB: if this is a list that i must subscribe to get the answer, will 
someone please tell me, i got the address from the FAQ, installed 
with lyx.

-- 
   |
 @(~Ô^Ô~)@
  -oOo---U---oOo-
  | |
  |  Stud. Ing. |
  |  Martin Hansen  |
  |  ICQ: 28332283  |
  | |
  | klogest er den som ved,|
  |  hvad han ikke ved |
  | Ooo |
  |_ooO(   )|
   (   )) /
\ ((_/
 \_)




Re: combining letters with an adress database

2001-06-06 Thread Kayvan A. Sylvan

On Wed, Jun 06, 2001 at 11:07:25PM +0200, Martin Hansen wrote:
 Is it possible to combine letters with an address database, so that i 
 get ex. 10 letters where only the 'to address' is different?
 I can't find anything in the documentation, about this.
 My lyx version is 1.1.5fix1.
 

I have done this with a hackish combination of Lyx and perl.

I create a letter template in LyX, putting in things like:

  Y
  Z

  Dear XX,

I format the leter and preview it, making sure I like the result.

Then I export the address database into a flat file (one record per line).

My perl script then reads each line, doing something like:

  my $num = 0;
  while (INPUT) {
Create temp_letter by doing the substitutions into the template
system(lyx --export ps temp_letter.lyx);
$num++;
rename(temp_letter.ps, letter_.$num..lyx);
  }

Afterwards, I just print letter_1.ps, letter_2.ps, etc.

This works because the lyx file is a simple ASCII file.

---Kayvan
-- 
Kayvan A. Sylvan  | Proud husband of   | Father to my kids:
Sylvan Associates, Inc.   | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | crown of her husband | Robin Gregory (2/28/92)



combining letters with an adress database

2001-06-06 Thread Martin Hansen

Is it possible to combine letters with an address database, so that i 
get ex. 10 letters where only the 'to address' is different?
I can't find anything in the documentation, about this.
My lyx version is 1.1.5fix1.

NB: if this is a list that i must subscribe to get the answer, will 
someone please tell me, i got the address from the FAQ, installed 
with lyx.

-- 
   |
 @(~Ô^Ô~)@
  -oOo---U---oOo-
  | |
  |  Stud. Ing. |
  |  Martin Hansen  |
  |  ICQ: 28332283  |
  | |
  | klogest er den som ved,|
  |  hvad han ikke ved |
  | Ooo |
  |_ooO(   )|
   (   )) /
\ ((_/
 \_)




Re: combining letters with an adress database

2001-06-06 Thread Kayvan A. Sylvan

On Wed, Jun 06, 2001 at 11:07:25PM +0200, Martin Hansen wrote:
 Is it possible to combine letters with an address database, so that i 
 get ex. 10 letters where only the 'to address' is different?
 I can't find anything in the documentation, about this.
 My lyx version is 1.1.5fix1.
 

I have done this with a hackish combination of Lyx and perl.

I create a letter template in LyX, putting in things like:

  Y
  Z

  Dear XX,

I format the leter and preview it, making sure I like the result.

Then I export the address database into a flat file (one record per line).

My perl script then reads each line, doing something like:

  my $num = 0;
  while (INPUT) {
Create temp_letter by doing the substitutions into the template
system(lyx --export ps temp_letter.lyx);
$num++;
rename(temp_letter.ps, letter_.$num..lyx);
  }

Afterwards, I just print letter_1.ps, letter_2.ps, etc.

This works because the lyx file is a simple ASCII file.

---Kayvan
-- 
Kayvan A. Sylvan  | Proud husband of   | Father to my kids:
Sylvan Associates, Inc.   | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | crown of her husband | Robin Gregory (2/28/92)



combining letters with an adress database

2001-06-06 Thread Martin Hansen

Is it possible to combine letters with an address database, so that i 
get ex. 10 letters where only the 'to address' is different?
I can't find anything in the documentation, about this.
My lyx version is 1.1.5fix1.

NB: if this is a list that i must subscribe to get the answer, will 
someone please tell me, i got the address from the FAQ, installed 
with lyx.

-- 
   |
 @(~Ô^Ô~)@
  -oOo---U---oOo-
  | |
  |  Stud. Ing. |
  |  Martin Hansen  |
  |  ICQ: 28332283  |
  | |
  | "klogest er den som ved,|
  |  hvad han ikke ved" |
  | Ooo |
  |_ooO(   )|
   (   )) /
\ ((_/
 \_)




Re: combining letters with an adress database

2001-06-06 Thread Kayvan A. Sylvan

On Wed, Jun 06, 2001 at 11:07:25PM +0200, Martin Hansen wrote:
> Is it possible to combine letters with an address database, so that i 
> get ex. 10 letters where only the 'to address' is different?
> I can't find anything in the documentation, about this.
> My lyx version is 1.1.5fix1.
> 

I have done this with a hackish combination of Lyx and perl.

I create a letter template in LyX, putting in things like:

  Y
  Z

  Dear XX,

I format the leter and preview it, making sure I like the result.

Then I export the address database into a flat file (one record per line).

My perl script then reads each line, doing something like:

  my $num = 0;
  while () {
<>
system("lyx --export ps temp_letter.lyx");
$num++;
rename("temp_letter.ps", "letter_".$num.".lyx");
  }

Afterwards, I just print letter_1.ps, letter_2.ps, etc.

This works because the lyx file is a simple ASCII file.

---Kayvan
-- 
Kayvan A. Sylvan  | Proud husband of   | Father to my kids:
Sylvan Associates, Inc.   | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)