Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   RTF Problem mit Outlook 2003 (https://www.delphipraxis.net/87503-rtf-problem-mit-outlook-2003-a.html)

LuckySpacy 1. Mär 2007 15:48


RTF Problem mit Outlook 2003
 
Was hat sich Microsoft denn jetzt schon wieder einfallen lassen?
Was mit Outlook 2000 funktionierte geht mit Outlook 2003 nicht mehr.

Folgendes Problem:
Ich möchte gerne einen Richtext im email-Body anzeigen lassen.
Mit Outlook 2000 kein Problem:

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Mail('mail@test.de', 'Betreff');
end;



procedure TForm1.Mail(const aRecipient, aSubject: String);
  const
  olMailItem = 0;
  cRTFText = '{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl' +
             '{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}'+
             '{\f2\froman Times New Roman;}}{\colortbl\red0\green0\blue0;}'+
             '\deflang1031\horzdoc{\*\fchars }{\*\lchars }\pard\plain\f2\fs20 '+
             ' Hier kommt ein \plain\f2\fs24\b formatiertert\plain\f2\fs20 '+
             ' Text.\par }';
  var
    MyOutlook   : Olevariant;
    MyMail      : Olevariant;
  begin
    try
      MyOutlook := CreateOLEObject('Outlook.Application');
      MyMail   := MyOutlook.CreateItem(olMailItem) ;

      MyMail.To     := aRecipient;
      MyMail.Subject := aSubject;

      MyMail.Display;

      MyMail.Body := cRTFText;

      MyOutlook := UnAssigned;
      MyMail   := UnAssigned;

    except
      on E: Exception do
      begin
        MessageDlg(E.Message, mtError, [mbOk], 0);
      end;
  end;
end;
Unter Outlook 2003 bekomme ich jetzt den unveränderten Inhalt von cRTFText angezeigt.
Weiß jemand, wie es funktioniert, dass ich unter Outlook 2003 auch den Richtext angezeigt bekomme?

Ich suche verzweifelt nach einer Lösung.

Christian Seehase 1. Mär 2007 18:00

Re: RTF Problem mit Outlook 2003
 
Moin LuckySpacy,

ist das Mailformat im Client denn auch auf RTF eingestellt?

DP-Maintenance 1. Mär 2007 20:55

DP-Maintenance
 
Dieses Thema wurde von "SirThornberry" von "Windows 9x / ME / 2000 / XP / 2003 / Vista" nach "VCL / WinForms / Controls" verschoben.

LuckySpacy 2. Mär 2007 08:17

Re: RTF Problem mit Outlook 2003
 
Also, unter Format ist ein Haken in Richtext drin.
In der Caption der email steht (Rich-Text).

Wenn ich eine Standardsignatur einstelle und unter "Extras/Optionen/E-Mail-Format/Senden im Nachrichtenformat" Richtext einstelle, dann wird meine Signatur auch im Richtext angezeigt.

Fülle ich aber den Bodytext wie oben im Quelltext zu sehen ist, dann wird dieser Richtext unter Outlook 2003 als Plaintext angezeigt, obwohl ein Haken in Richtext drin ist.

Das ganze funktioniert unter Outlook 2000 einwandfrei und unter Outlook 2003 geht das nicht mehr.

Jetzt meine Frage:
Hat jemand damit unter Outlook 2003 keine Problem, oder habe nur ich diese?

Das Outlook 2003 habe ich leider nur in Englisch zur Verfügung.
Daran kann es aber nicht liegen, denn auch in Englisch sollte der Richtext als Richtext angezeigt werden.
Zumal die Signatur ja auch als Richtext richtig angezeigt wird.


Alle Zeitangaben in WEZ +1. Es ist jetzt 06:14 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz