Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting An Expression With A Carriage Return For Send Email Text

Status
Not open for further replies.

Skittle

ISP
Sep 10, 2002
1,528
US
I have a rinky-dinky package that sends an email with lots of information about a failed task. The email is for users and so needs to be nicely formatted.

I have concatonated standard text with variable values into an email message string but I need to break it up a bit with new line or carriage return/line feed characters.
Trouble is I can't see an option for it.

Has anybody got any suggestions?



Dazed and confused
 
Insert char(13) carrage returns into your text string:

Example:

'This is line one ' + Char(13) +
'This is line two. '

char(9) can also be used for tabbing.
 
Not sure the Char() solution would work if you are doing it inside of an expression worth a try if not \n should work.

Paul
---------------------------------------
Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
I can't get either of these options to be accpted in an Expression value field for a variable or the Send Email task.

Unless anybody has a better idea, I figure I'll have to use vbscript.


Dazed and confused
 
I ended up placing a script task as the first step in the package. The script task sets a package variable to
CHR(13) and then I can include the variable within an expression field where ever I want to get a new line.



Dazed and confused
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top