Outlook 97, Inbox, SenderName not avail. to Delphii
Retrieveing messages from Outlook 97 via Delphi 3.0
Has anybody succeded in retrieving the
"SenderName" of a message in the inbox folder?
Calling the SenderName (From) property results in the following:
...raised an exception class EOleError with message
'Method 'SenderName' not supported bu automation object'
Process stopped Use Setp or Run to continue.
I should thought that SenderName was one of
the most important fields in the message.
Most other info (Body,Subject,EntryId,Size) is receved OK.
- Cut from my Delphi 3.0 program -------------------
procedure TForm1.TTY(Msg: string);
begin
with Memo1.Lines do Add(Msg);
end;
.
MyNameSpace := MyOutlook.GetNamespace('MAPI');
MyPages:= MyNameSpace.Logon('MyUser','MyPassword',false,true); // no
dialogue
MyFolder := MyNameSpace.GetDefaultFolder(olFolderInbox);
TTY('#-of msg in Folder: '+MyFolder.Name+'
('+IntToStr(MyFolder.Items.Count)+')');
for i:=1 to MyFolder.Items.Count do begin
// TTY('(SenderMame):'+MyFolder.Items(i).SenderName);
TTY('(subject) :'+MyFolder.Items(i).Subject);
TTY('(body) :'+MyFolder.Items(i).Body);
TTY('(EntryId) :'+MyFolder.Items(i).EntryId.SenderName);
TTY('(Size) :'+IntToStr(MyFolder.Items(i).Size)
end;
.
.
- Cut end ----------------------------
Appreceate any help on this problem.
Sigmund Fjellberg
TELKO A/S
supp...@telko.no