Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi Outlook 2010 will Anhänge als XPS speichern - wie verhindern? (https://www.delphipraxis.net/164628-outlook-2010-will-anhaenge-als-xps-speichern-wie-verhindern.html)

FBrust 22. Nov 2011 15:25

Outlook 2010 will Anhänge als XPS speichern - wie verhindern?
 
Hallo,

mit folgendem Code erzeuge ich eine Mail mit PDF-Anhängen und versende sie:

Delphi-Quellcode:
      try
        oleOutlook := GetActiveOleObject('Outlook.Application');
      except
        oleOutlook := CreateOleObject('Outlook.Application');
      end;
      strMailText := 'Sehr geehrte Damen und Herren, ' + #10#13;
      strMailText := strMailText + 'Die Ergebnisse der Prüfung haben wir ';
      strMailText := strMailText + 'als Anhang beigefügt.';
      strMailText := strMailText + #10#13#10#13;
      strMailText := strMailText + strMailFooter;

      TaskItem := oleOutlook.CreateItem(oleMailItem);

      TaskItem.To := GetMailRecipients(intCustID, intBuildID,'Mail');
      TaskItem.Subject := 'Testergebnisse für ' + strCustName;
      TaskItem.Body := strMailText;
      vrAttach := TaskItem.Attachments;
      vrAttach.Add(strFilename);
      //------Hier werden zusätzlich die Reklamationsberichte angehängt:
      if slFiles.Count > 0 then
        for iCnt := 0 to slFiles.Count -1 do
          vrAttach.Add(slFiles.Strings[icnt]);
      if strExcelFile <> '' then
        vrAttach.Add(strExcelFile);
      TaskItem.Send;
      oleOutlook := Unassigned;
Das hat bisher mit Outlook 2003 und 2007 problemlos funktioniert.
Auf einem der Rechner, wo das Programm läuft, ist nun Outlook 2010 installiert und das will die Anhänge jedesmal als XPS-Datei auf dem Rechner speichern. Die Mail wird aber wie programmiert mit den PDF-Anhängen weggeschickt, auch wenn man in dem Speicherdialog auf "Abbrechen" klickt.

Da ich nun nicht sicher bin, ob das ein Problem meines Codes ist oder ob in Outlook eine Einstellung gemacht werden muss, frage ich mal hier nach, ob jemand evtl. mal das gleiche Problem hatte.

Bin für jeden Tip dankbar.

Gruß
Frank


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:08 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