Hallo zusammen,
ich nutze D5 + Outlook8.pas und sende mit unten stehenden Code Mails über Outlook. Das klappt auch sehr gut . Probleme gibt es aber mit Outlook 2007 . Hier kommt immer die Meldung: "Klasse nicht registriert"
Hat jemand eine Idee oder einen Tipp
Vielen Dank...
procedure sendOutLool97Mail1(an,sub,text,fn: string);
var aOutlook: TOutlookApplication;
aMapi: NameSpace;
aOutBOx: mapiFolder;
aMail: mailItem;
aReci: Recipient;
myIns: Inspector;
body: widestring;
begin
aOutlook :=TOutlookApplication.Create(nil);
aMapi :=aOutlook.GetNamespace('MAPI');
aOutBox :=aMapi.GetDefaultFolder(olFolderOutBOx);
aMail :=aOutBox.items.add(olMailItem) as MailItem;
aMail.Attachments.Add(fn, olByValue, 1, 'Attachment');
aMail.Subject:=sub;
aMail.Display(olFolderDisplayNormal);
aOutlook:=nil;
end;
ich nutze D5 + Outlook8.pas und sende mit unten stehenden Code Mails über Outlook. Das klappt auch sehr gut . Probleme gibt es aber mit Outlook 2007 . Hier kommt immer die Meldung: "Klasse nicht registriert"
Hat jemand eine Idee oder einen Tipp
Vielen Dank...
procedure sendOutLool97Mail1(an,sub,text,fn: string);
var aOutlook: TOutlookApplication;
aMapi: NameSpace;
aOutBOx: mapiFolder;
aMail: mailItem;
aReci: Recipient;
myIns: Inspector;
body: widestring;
begin
aOutlook :=TOutlookApplication.Create(nil);
aMapi :=aOutlook.GetNamespace('MAPI');
aOutBox :=aMapi.GetDefaultFolder(olFolderOutBOx);
aMail :=aOutBox.items.add(olMailItem) as MailItem;
aMail.Attachments.Add(fn, olByValue, 1, 'Attachment');
aMail.Subject:=sub;
aMail.Display(olFolderDisplayNormal);
aOutlook:=nil;
end;
Comment