Try replacing vbCrLf instead of Chr(13).
Replace(Trim(element.value), vbCrLf,"")
Ray at work
"Séverine Donnay" <> wrote in message
news

Vukd.24682$ ...
> Hi,
>
> I make a csv file with values from data base fields . If my value contains
> a
> carriage return caracter at the end, a new line is created in my csv file.
> I
> tried to replace chr(13) caracter by an empty caracter but it doesn't
> work,
> my code is :
> Replace(Trim(element.value), chr(13),"")
>
> Do you have any idea to resolve my problem ?
> Thanks.
>
> Severine
>
>