MAPI call and Carrige Return

McLeanMcLean Member Posts: 32
edited 2000-07-28 in Navision Financials
I need to generate a list of items and send this via outlook. The email connection works fine but I cannot send a carrige return/new line with each text item. I have tried asc(10) and chr(10) but Navision sees these as undeclared variables. The following also doesn't work.
CR is declared as type character.
CR:=10;
Body3:='Software Package :' + "Misc. Article Information".Description + ' Client/Project: '+CR;

Any suggestions?

Comments

  • McLeanMcLean Member Posts: 32
    Thanks, but no matter how I code it I get the following:
    SOFTWARE: MS Project; Client/Project:CHR(13)SOFTWARE: Navision; Client/Project: CHR(13)SOFTWARE: Visio; Client/Project: CHR(13)SOFTWARE: MS Project; Client/Project:CHR(13)SOFTWARE: Dream Weaver; Client/Project:CHR(13)

    As you can see the CHR(13) appears as a literal.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    I use the following code and it works just fine:

    char10 := 10;
    OutlContactItem.Body := 'CustomNo: ' + "No." + FORMAT(char10) + 'This is line 2';

    with char10 being a variable of type Char.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • McLeanMcLean Member Posts: 32
    My code looks like this:

    char10:=10;
    Body3:='Software Package :' + "Misc. Article Information".Description + ' Client/Project: '+FORMAT(char10)+' ';

    MAPIMessages.MsgNoteText := Body + Body2 + Body3;

    I see you are using OutlContactItem.Body
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    You have to use "FORMAT(CR)"
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • mfabianmfabian Member Posts: 187
    Var
    CRLF : Text[2]
    Begin
    CRLF[1] := 13;
    CRLF[2] := 10;
    OutlContactItem.Body := 'CustomNo: ' + "No." + CRLF + 'This is line 2' + CRLF;
    End;



    Marcus Fabian
    m.fabian@thenet.ch
    +41 79 439 78 72
    With best regards from Switzerland

    Marcus Fabian
  • McLeanMcLean Member Posts: 32
    Thanks Luc and fabian,
    Both your suggestions work. I was doing something really stupid. I kept modify a section of code which wasn't being called so the changes had no effect!!

    Regards
    Angus
Sign In or Register to comment.