Outlook Body text Tab character insertion

Divya
Member Posts: 125
Hi,
I used "Mail" Codeunit to create mails from navision. I have added body text of the mail. But I need to write in the mail like,
XXXX <tab> : <tab> X1
YYYY <tab> : <tabl> Y1
It should be aligned properly, and Here my code is,
Chr9 := 9;
Chr13 := 13;
MailMgt.AddBodyline('XXX' + Chr9 + ':' + Chr9 + 'X1' + Chr13);
MailMgt.AddBodyline('YYY' + Chr9 + ':' + Chr9 + 'Y1' + Chr13);
But instead of TAB, it is printing as SPACES. It is not alligned properly. I could not find out the issue.
Please give me any idea about this issue.
Thanks,
Divya
I used "Mail" Codeunit to create mails from navision. I have added body text of the mail. But I need to write in the mail like,
XXXX <tab> : <tab> X1
YYYY <tab> : <tabl> Y1
It should be aligned properly, and Here my code is,
Chr9 := 9;
Chr13 := 13;
MailMgt.AddBodyline('XXX' + Chr9 + ':' + Chr9 + 'X1' + Chr13);
MailMgt.AddBodyline('YYY' + Chr9 + ':' + Chr9 + 'Y1' + Chr13);
But instead of TAB, it is printing as SPACES. It is not alligned properly. I could not find out the issue.
Please give me any idea about this issue.
Thanks,
Divya
Victory is sweetest when you've known defeat
0
Comments
-
I guess Chr9 and Chr13 are of Data Type Char.
UseMailMgt.AddBodyline('XXX' + FORMAT(Chr9) + ':' + FORMAT(Chr9) + 'X1' + FORMAT(Chr13)); MailMgt.AddBodyline('YYY' + FORMAT(Chr9) + ':' + FORMAT(Chr9) + 'Y1' + FORMAT(Chr13));
0 -
Hi,
Yes. I used like this way only.. Sorry i missed format() when i post the code.
Still im facing same issue.
Thanks,
DivyaVictory is sweetest when you've known defeat0 -
I used following code rather than using .AddBodyline function and working fine..
Chr9 := 9; Chr13 := 13; BodyTxt := ('XXX' + FORMAT(Chr9) + ':' + FORMAT(Chr9) + 'X1' + FORMAT(Chr13)); BodyTxt := BodyTxt + ('YYY' + FORMAT(Chr9) + ':' + FORMAT(Chr9) + 'Y1' + FORMAT(Chr13)); MailMgt.NewMessage('abc@gmail.com','','Hi',BodyTxt,'',FALSE); MailMgt.Send;
Can you show your code please..0 -
hi.. try this code..
Chr9 := 9; Chr13 := 13; BodyTxt := ('XXXXX' + FORMAT(Chr9) + ':' + FORMAT(Chr9) + 'X1' + FORMAT(Chr13)); BodyTxt := BodyTxt + ('YYYYYYY' + FORMAT(Chr9) + ':' + FORMAT(Chr9) + 'Y1' + FORMAT(Chr13)); MailMgt.NewMessage('abc@gmail.com','','Hi',BodyTxt,'',TRUE);
Victory is sweetest when you've known defeat0 -
Offcorce, here You have 5 X's in first line and 7 Y's in second line..
If you have equal No. of letters in both lines then the allignment will be proper..0 -
BUT, if im entering text manually in the outlook new mail message body section, It is working. It is aligned properly.
if 1st sentence chars is more than 2nd sentense, i can change the code to put 2 tab position, that is not a problem.
But even if i use 2 tab positon, it is not aligning.Victory is sweetest when you've known defeat0
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