S
Sitchensis
Hi all,
I have used this code (below) to emulate programatically a user
clicking on the Purge Deleted Messages button in microsoft outlook to
remove completely deleted messages from an imap server (just deleting
will not work for POP3 or IMAP served mail). However, I then get the
confirmation dialog asking me whether I'm sure I want to delete same
messages.
Sub PurgeMessages()
Dim myBar As CommandBar
Set myBar = Application.ActiveExplorer.CommandBars("Menu Bar")
Dim myButtonPopup As CommandBarPopup
Set myButtonPopup = myBar.Controls("Edit")
Dim myButton As CommandBarButton
Set myButton = myButtonPopup.Controls("Purge Deleted Messages")
myButton.Execute
End Sub
I'd like to avoid the confirmation dialog, so is there any way to
emulate a return (yes confirmation) keystroke in the sub or must the
user always confirm yes in the dialog to delete the mail?
Any suggestions/workarounds? Thanks in advance for your time.
Sitchensis.
I have used this code (below) to emulate programatically a user
clicking on the Purge Deleted Messages button in microsoft outlook to
remove completely deleted messages from an imap server (just deleting
will not work for POP3 or IMAP served mail). However, I then get the
confirmation dialog asking me whether I'm sure I want to delete same
messages.
Sub PurgeMessages()
Dim myBar As CommandBar
Set myBar = Application.ActiveExplorer.CommandBars("Menu Bar")
Dim myButtonPopup As CommandBarPopup
Set myButtonPopup = myBar.Controls("Edit")
Dim myButton As CommandBarButton
Set myButton = myButtonPopup.Controls("Purge Deleted Messages")
myButton.Execute
End Sub
I'd like to avoid the confirmation dialog, so is there any way to
emulate a return (yes confirmation) keystroke in the sub or must the
user always confirm yes in the dialog to delete the mail?
Any suggestions/workarounds? Thanks in advance for your time.
Sitchensis.