Help with text array and newlines

teeter
Member Posts: 46
So I'm trying to have some kind of formatted body in an email I'm generating. I have an array of 6 text objects
EmailBody[1], EmailBody[2], etc.
I want these to be separated by a new line. How can I do this?
I've tried
BodyText := EmailBody[1]+ '\' +EmailBody[2]
BodyText := EmailBody[1]+ '/' +EmailBody[2]
BodyText := EmailBody[1]+ FORMAT(Char13) +FORMAT(Char10)+ +EmailBody[2]
and have also tried using the .AddBodyLine function with no success, as the .NewMessage seems to take priority.
Any thoughts, ideas, solutions?
Thanks in advance,
Joel
EmailBody[1], EmailBody[2], etc.
I want these to be separated by a new line. How can I do this?
I've tried
BodyText := EmailBody[1]+ '\' +EmailBody[2]
BodyText := EmailBody[1]+ '/' +EmailBody[2]
BodyText := EmailBody[1]+ FORMAT(Char13) +FORMAT(Char10)+ +EmailBody[2]
and have also tried using the .AddBodyLine function with no success, as the .NewMessage seems to take priority.
Any thoughts, ideas, solutions?
Thanks in advance,
Joel
0
Answers
-
do you get an error when you try the slash without the quotes?
Why Add them together?0 -
yeah a \ gives a syntax error, while / is trying to divide
The irony on this one is stifling as I just figured out how to use file paths WITHOUT creating newline #-o0 -
perhaps you can see how it's done in the Format Address Codeunit (365)
WITH BillOfLading DO FormatAddr( AddrArray,"Ship-to Name","Ship-to Name 2","Ship-to Contact", "Ship-to Address","Ship-to Address 2","Ship-to City", "Ship-to ZIP Code","Ship-to State","Ship-to Country Code");
Even tho all these field are in an array , they print on seperate lines using the comma
EmailBody[1],EmailBody[2],EmailBody[3],EmailBody[4],etc
Look at COMPRESSARRAY in the c/side help for more info0 -
I checked out the code unit, but IIRC its used in reporting, and you still have a text box for each element....however,
:oops:
I forgot to assign
Char13 :=- 13;
Char10 := 10;
worked like a charm #-o
Thanks for the help!
its sooooo time for a beer0 -
teeter wrote:its sooooo time for a beer
I hear that! =P~0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions