PDA

View Full Version : Select/mark mail in Outlook folder using VBA



Burkhard
03-16-2022, 03:30 AM
Hi,
I am using a VBA macro to loop through an Outlook folder (and subfolders, if present). How can I achieve that one specific mail is selected in Outlook explorer when the macro finishes?
Thanks for any help.

gmayor
03-16-2022, 06:05 AM
How can I achieve that one specific mail is selected in Outlook explorer when the macro finishes?
What 'specific mail' would that be?

Burkhard
03-16-2022, 09:32 AM
When VBA loops through a folder, the mails are checked for different criteria. If a mail meets some (or all) of them, the macro should stop and that mail should be selected (in Outlook), so that the user can decide what to do next. (This somewhat strange procedure is necessary, because not all Outlook actions can be executed within VBA - e.g. opening an encrypted mail.)