/ 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?

#7959
MSchatz
Participant

Thanks a lot for your quick response. It solved my problem.

I was looking for a way to archive all items in selected folder, so selecting “Mailbox” is not allowed. For anyone looking here, I post some of my additions to your code:

 
  dim oFolder
  dim oMessages

  set oFolder = client.clientstate.selectedfolder

  if (oFolder.ObjType <> fgwMailbox) then
    set oMessages = oFolder.Messages
    for each Message in oMessages
      Message.Archived = true
    next
    set oMessages = nothing
  else
    msgbox "Not allowed here."
  end if

  set oFolder = nothing

In real life, you would wrap some code around like status dialog a.s.o.

BTW, as a longterm delphi programmer I am somewhat spoiled with code-completion and in-depth documentation. Are there any chances to get at least one of them into Formativ? I see there are a lot of documentation, but it is a bit complicated to find, what you are looking for.

Regards,
M. Schatz