The delay can be obtained through the Sleep() API function, so include this at the module level (comment one line out, depending on whether you're running the 32 or 64 bit version of Outlook - that will be 32 for most, also on 64 bit systems): I found that it works better if you include a short delay (1/4 second) before sending the F5. works only if message list has the focus): just sending an F5 right after modifying message properties doesn't fully do the trick, it missesĪ few messages sometimes. Or to send a keystroke to a specific window pane, instead of just "to the window"?īTW, in case anyone would be searching for a way to refresh, and my existing solution would be sufficient (i.e.If there isn't, is there a way to programmatically set the focus to the message list?.Is there a way to force-refresh the message list, other than sending it an F5 keystroke?.The problem is in the final part: that only works if the message list has the focus when the macro is started. It scans though a number of subfolders of my inbox, searches for specific messages there, marks them read, and finally sends an F5 keystroke to refresh the unread items view. I have a macro that I use mostly when in the "unread items" search view. I find a lot of questions similar to this, but nowhere an answer except for "it can't be done" (which is actually not 100% correct, as you'll see below).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |