AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Sonstige Fragen zu Delphi Outlook, OLE, Outlook.Exe wird nicht beendet
Thema durchsuchen
Ansicht
Themen-Optionen

Outlook, OLE, Outlook.Exe wird nicht beendet

Ein Thema von hoika · begonnen am 24. Jul 2012 · letzter Beitrag vom 24. Jul 2012
 
hoika

Registriert seit: 5. Jul 2006
Ort: Magdeburg
8.270 Beiträge
 
Delphi 10.4 Sydney
 
#1

Outlook, OLE, Outlook.Exe wird nicht beendet

  Alt 24. Jul 2012, 10:07
Hallo #,

folgender Code klappt soweit ganz gut.
Leider bleibt aber die Outlook.Exe (Outlook 2007) offen.
Warum ?

Danke


Heiko

Delphi-Quellcode:
var

uses
  OutlookXP;
var
  Outlook: OutlookXP._Application; // OutlookApplication; for D5 users
  NmSpace: NameSpace;
  Folder: MAPIFolder;
  Inbox: MAPIFolder;
  InboxSubFolder: MAPIFolder;
  bFound: Boolean;
begin
  Outlook := CoOutlookApplication.Create;

  NmSpace := Outlook.GetNamespace('MAPI');
  NmSpace.Logon('', '', False, False);

  Inbox:= NmSpace.GetDefaultFolder(olFolderInbox);
// MessageBox(0, PChar(IntToStr(Inbox.Items.Count)), 'Inbox', 0);

  bFound:= False;
  for i := 1 to Inbox.Folders.Count do
  begin
    InboxSubFolder:= Inbox.Folders.Item(i);
    sSubFolderName:= InboxSubFolder.Name;
    if sSubFolderName='MySubFolder'{heisst anders} then
    begin
      bFound:= True;
      break;
    end;
  end;


    Inbox:= NIL;
    InboxSubFolder:= NIL;
    NmSpace.Logoff;
    Outlook.Quit;
    Outlook := nil; // Early binding with interfaces
  end;
Heiko
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:36 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