/ Forums / Advansys Formativ / Creating Solutions with Formativ / Newbie Question – How to select all mails in specific folder? / Reply To: Newbie Question – How to select all mails in specific folder?
If you want to access all messages in a given folder then try the following code. Note that, you have to use bit different technique when accessing the messages in Mailbox folder. Mailbox folder usually contains the sent messages which you can not see in client.
dim oFolder dim oMessages set oFolder = client.clientstate.selectedfolder if (oFolder.ObjType = fgwMailbox) then set oMessages = oFolder.messages.find("(BOX_TYPE=INCOMING)") msgbox oMessages.count set oMessages = nothing else msgbox oFolder.Messages.count end if set oFolder = nothing