Board index » delphi » TIdAttachment - Undeclared Identifier

TIdAttachment - Undeclared Identifier


2005-02-03 01:00:37 PM
delphi56
Hi All,
I am trying to use the following code to get the Name of an attachment in
D2005 & Indy10 , but D2005 complains that TIdAttachment is an Undeclared
Identifier.
What am I missing.
for X := 0 to IdMessage1.MessageParts.Count -1 do
begin
if ( IdMessage1.MessageParts.Items[ X ] is TidAttachment )
then
name :=
(TidAttachment(idmessage1.MessageParts.Items[x]).FileName);
end;
Thanks
Gordon.
 
 

Re:TIdAttachment - Undeclared Identifier

"Gordon Waters" <XXXX@XXXXX.COM>writes
Quote
I am trying to use the following code to get the Name of an attachment
in D2005 & Indy10 , but D2005 complains that TIdAttachment is an
Undeclared Identifier.
You probably did not add IdAttachment to your uses clause.
Gambit
 

Re:TIdAttachment - Undeclared Identifier

"Remy Lebeau (TeamB)" <XXXX@XXXXX.COM>writes
Quote

"Gordon Waters" <XXXX@XXXXX.COM>wrote in
message
news:4201aff3$XXXX@XXXXX.COM...

>I am trying to use the following code to get the Name of an attachment
>in D2005 & Indy10 , but D2005 complains that TIdAttachment is an
>Undeclared Identifier.

You probably did not add IdAttachment to your uses clause.


Gambit


Hi Gambit
Thats it , didnt realise I had to add that.
Thanks
Gordon.