I need to put the recipient's address on the right of the letter.
I'm using scrlttr2 class and I know that it is very flexible, but I can't find a way to do that.
I need to put the recipient's address on the right of the letter.
I'm using scrlttr2 class and I know that it is very flexible, but I can't find a way to do that.
The horizontal position of the the address field is determined by the pseudolength toaddrhpos. A value of toaddrhpos greater than 0 means the distance from the left border, a value lower than 0 means the distance from the right border.
So you could use something like
\makeatletter
\@setplength{toaddrhpos}{-1cm}
\makeatother
or
\makeatletter
\@setplength[-]{toaddrhpos}{\useplength{toaddrhpos}}
\makeatother

Code:
\documentclass{scrlttr2}
%%% only to show the fields, do not use in your real document
\LoadLetterOption{visualize}
\showfields{address,head}
%%%
\makeatletter
\@setplength[-]{toaddrhpos}{\useplength{toaddrhpos}}
\makeatother
\usepackage{blindtext}% for dummy text
\begin{document}
\begin{letter}{Max Mustermann\\Musterstr.12\\12345 Musterhausen}
\opening{Hello}
\blindtext
\end{letter}
\end{document}
Other pseudolengths related to the address field are toaddrvpos, toaddrwidth and toaddrheight.
And you can use \addtokomafont{addressee}{\raggedleft} to right align the address in the address field:

Code:
\documentclass[backaddress=false,fromalign=right]{scrlttr2}
%%% only to show the fields, do not use in your real document
\LoadLetterOption{visualize}
\showfields{address,head}
%%%
\makeatletter
\@setplength[-]{toaddrhpos}{\useplength{toaddrhpos}}
\makeatother
\addtokomafont{addressee}{\raggedleft}
\setkomavar{fromname}{Kombi Karle}
\setkomavar{fromaddress}{Kaiserstr.\\Karlsruhe}
\usepackage{blindtext}% for dummy text
\begin{document}
\begin{letter}{Max Mustermann\\Musterstr.12\\12345 Musterhausen}
\opening{Hello}
\blindtext
\end{letter}
\end{document}
But there are also some Letter Class Option files included in the KOMA-Script Distribution having the recipient's address on the right.
Use \LoadLetterOption{SN} (Swiss letters with address field on the right side) in the preambel to get:

Or \LoadLetterOption{NF} (French letters):

This is my best guess. Many many more information can be found in the answer by @esdd.

\documentclass[backaddress=false,fromalign=right,NF]{scrlttr2}
\makeatletter
\@setplength{toaddrhpos}{-2cm}
\@setplength{toaddrwidth}{5cm}
\usepackage{blindtext}
\setkomavar{fromname}{Renato P.}
\setkomavar{fromaddress}{Lillipond lane\\Magnolia Town}
\begin{document}
\begin{letter}{Bella Bee\\Honeycomb 42\\The hive}
\opening{My Dear Bella,}
it is a long time we haven't met and i miss you.
\blindtext
\closing{Wish You Were Here}
\end{letter}
\end{document}
toaddrwidth additionally? If the text in a line of the address field is longer it could run out of the paper without a warning. Use \LoadLetterOption{visualize} \showfields{address} in the preamble to show the position and the width of the address field.
– esdd
Jun 19 '15 at 08:47
\documentclass{...}and ending with\end{document}. – karlkoeller Jan 27 '15 at 13:19