Thank you very much Wolfgang, It works very well and perfectly suits my needs.
Thanks again, > Le 24 mai 2019 à 18:05, Wolfgang Schuster <wolfgang.schuster.li...@gmail.com> > a écrit : > > The problem is that you put the letter-environment in a command but the > environment uses the buffer mechanism to store the content which doesn't work > when it is used in a command definition. > > What you have to do is to move the content of the letters out of the > \GenLetter command, you can use the lettercontent-environment for this. In > the \GenLetter command you now use the \placeletter command to flush the > content of the letter with the current values for the address etc. > > %%%% begin example > \usemodule[letter] > > \setupletter > [signature={JPR}, > closing={Sincerely yours,}] > > \setupletter > [ toname=\correspondenceparameter{to}, > toaddress=\correspondenceparameter{adr}, > opening=\correspondenceparameter{civ}] > > \startlettercontent > Blah blah \correspondenceparameter{civ}. > \stoplettercontent > > \def\GenLetter[#1]% > {\begingroup > \setupletter[#1]% > \placeletter > \endgroup} > > \starttext > > \GenLetter[civ={M.}, to={Pierre Durand}, adr={Trifouillis-les-Oies}] > > \stoptext > %%%% end example > > Wolfgang -- Jean-Philippe Rey jean-philippe....@centralesupelec.fr 91192 Gif-sur-Yvette Cedex - France Empreinte PGP : 807A 5B2C 69E4 D4B5 783A 428A 1B5E E83E 261B BF51 ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________