You need to use GetMessageHeader() to retrieve the subject and Message Id in the first pass, then go back and grab just the message you want with GetMessage(). You should probably use the MessageId not the number since hte number will change unless you stay connected to the POP3 server the whole time...
Basic thing is Use GetMessageHeader() to check the message header, then call GetMessage() to retrieve the full message. If you do this all in the same pass you can do this with the same index.
If the messages are not big in general you probably don't need to worry about this and just use GetMessage() instead.
+++ Rick ---
>I am trying to read only messages with specific subject:
>
>IF loPOP.Connect()
>
> *lnMsgs = loPop.GetmessageHeader()
> lnMsgs = loPop.GetMessages()
>
> IF lnMsgs > 0
> For x = 1 to lnMsgs
> WAIT loPop.aMessages[x].csubject WINDOW
> ENDFOR
> ENDIF
>ENDIF
>
>If I use getmessageHeader instead of getmessages, I have only empty emails. I want to read only the header, see if the subject is = "ABC" and then download only these.
>
>Any suggestions ?
>
>Thanks
>
>Eric