[Outlook] Problem with attachments

Add-in Express™ Support Service
That's what is more important than anything else

[Outlook] Problem with attachments
 
Mykhaylo Boreyko


Guest


Hello.

I'm working now with outlook attachments. I have code that checks if mail has attachments and then does some processing. All is working fine.

But then I included into email body some picture.
And this picture was also processed, however it should not be processed.

Here is code for retrieving attachments list for processing

function GetAttachmentList(item: _MailItem; var list: TStringList): boolean;
var
    i   : integer;
    temp: OleVariant;
begin
    Result := true;
    list.Clear();
    try
        for i := 1 to Item.Attachments.Count do
        begin
            temp := Item.Attachments.Item(i);
            if Item.Attachments.Item(i).type_ <> olByValue then
                continue;
            list.Add(temp.FileName);
        end;
    except
        on E: Exception do
        begin
            Result := false;
        end;
    end;
end;


Can you tell me how can I check that attachment is picture (or other object) and is embedded in email body?
Posted 25 Oct, 2012 09:27:32 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Posted 25 Oct, 2012 10:09:13 Top