WshShell.Popup does't timeout

JAWChemist

Member
Outlook version
Outlook 2007
Email Account
POP3
ISSUE
The popup message box (object.Popup) does not time out and close after 2 seconds in Outlook.
Outlook VbaProject.OTM has no other code except that listed below.
It works in Excel, Word, Access, PowerPoint and Publisher.

QUESTIONS
Can it be made to work?
Why does it work in other MS Office programs but not Outlook?
Has this issue been propagated to new versions of MS Office?

RESEARCH
The best explanation that might be related is Popup won't close automatically where mr_unreliable (aka jw) suggests to Steve Ginn that his app (dbWorks) has it own messaging timer. Since it is not expecting the notification, it ignores it and does not forward the time's up to wscript shell popup. I would expect Outlook to have a message loop of its own and the timeout not get passed along.

ENVIRONMENT
AMD Ryzen 5 2600
Window 10 10.0.19041 (64)
MS Office Professional 2007 (12.0.6785.5000) SP3 MSO

<code>
Sub MBT()
Dim MsgBoxTimedClose As Object, MsgBoxTimedCloseButton As Integer
Set MsgBoxTimedClose = CreateObject("WScript.Shell")
MsgBoxTimedCloseButton = MsgBoxTimedClose.PopUp("Close after 2 seconds", timeout, "MsgBoxTitle", 0)
End Sub
</code>
 

JAWChemist

Member
Outlook version
Outlook 2007
Email Account
POP3
Thank you for your quick response.
There may have been some confusion. The code was simplified and the variable "timeout" should have been 2.
This is a WshShell method that is used to timeout a msg box without user interaction as code execution stop until a button is clicked in a standard msg box.
This issue has been reported by others in the various office programs but I only had it with Outlook.
Some suggested solutions were:
1. create a vbs script with the intButton = object.Popup(strText,[nSecondsToWait],[strTitle],[nType]) method and run the vbs script from Outlook
2. create an Outlook form with at timer.
Being unfamiliar with Vboffice.net timer, I will review examples. At the moment, it is unclear to me how this would be made to interact with the msg box to have it close and the code continue after an interval was timed out.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I was addressing this - "Why does it work in other MS Office programs but not Outlook?"

If its using VBA for the timer (which is in the other office apps), it won't work in Outlook as there is no timer function. This has not changed in newer versions - no timer in them either.
 
Similar threads
Thread starter Title Forum Replies Date
D Prevent popup of "Do you want to save changes?" when closing after opening an appointment to view Outlook VBA and Custom Forms 2
GregS Outlook 365 blocked by Google popup Using Outlook 2
L How do you turn off Outlook contacts "hints" popup Using Outlook 2
I Windows 10 - .msg files on disk show Explorer popup error Using Outlook 5
T Unable to 'Upload a file' using popup 'Browse' button Using Outlook 0
rohit I want to Populate Popup box while sending any email with attachment. Outlook VBA and Custom Forms 4
rohit I want to Populate Popup box while sending any email with attachment Using Outlook 1
moron save as & file location dialog box popup Outlook VBA and Custom Forms 2
P Country name no longer shows in Phone number popup? Using Outlook 5
P POP mail password popup after I deleted the accopunt Using Outlook 6
L Auto-set followup/reminder popup box for ALL sent emails. Using Outlook 0
M Cannot change category in inbox; Can change it in popup Using Outlook 0
C Disabling "Do you want to save changes?" Meeting Popup? Using Outlook 0
T Outlook 2007 SSL selfsigned certificate how to stop security popup everytime? Using Outlook 10
H Popup asks for password of an email account Using Outlook 1
I Notification/Popup Box not showing on right side Using Outlook 1
W Outlook Desktop alert, notification, popup - turn off programattic Outlook VBA and Custom Forms 1
M Files in "Attach File" popup menu no longer alphabetical Using Outlook 3
H popup window "Location Information" Microsoft Office Outlook 2007 Using Outlook 3
D Suppress Popup Outlook VBA and Custom Forms 1
V CommandBar popup Outlook VBA and Custom Forms 1
N Save selected messages VBA does not save replies and/or messages that contain : in subject Outlook VBA and Custom Forms 1
T Junk Email does not get added to the Blocked Sender List Using Outlook 0
L Does this really work and get thru virus and malware blocks? Using Outlook 3
V Outlook 2016 Does Outlook-2016 (64 bit) work with iCloud for Windows ? Using Outlook 5
F Junk Email does not get added to the Blocked Sender List Using Outlook 4
N Free/busy publish at http location does not work Using Outlook 1
T Why does outlook 2010 convert only some forum notifications to plain text? Using Outlook 0
R Auto display of new email does not work on non-default account Outlook VBA and Custom Forms 0
M Deleting attachments does not reduce file size Using Outlook 0
M vCard does not have user-defined fields from my custom contact form (365) Using Outlook 1
M Outlook .com group does not show up in Outlook for office 365 home Using Outlook 3
W Outlook Calendar does not save view any longer! Using Outlook 3
B Outlook 2016 Does not Shutdown Correctly Using Outlook 3
P Desktop doesn't index Outlook IMAP files, laptop Outlook does index those same IMAP files Using Outlook 2
G Entered data in custom field goes in card and does not stay in list view Outlook VBA and Custom Forms 1
witzker social connector 2010 does not show all emails to or from contact Using Outlook 3
witzker social connector 2010 does not show all emails to or from contact Using Outlook 0
Rupert Dragwater Email flag does not show up in Outlook2013 Using Outlook 13
J Outlook 2016 message content does not display - outlook.com; exchange Using Outlook.com accounts in Outlook 9
D Outlook 2016 IMAP Connection Returns All Email but outlook.com does NOT Using Outlook.com accounts in Outlook 2
A BCM does not work anymore! BCM (Business Contact Manager) 1
D Outlook 2016: /altvba startup switch does not work Using Outlook 2
A BCM does not work with Windows 10 1703 any more BCM (Business Contact Manager) 3
S Outlook does not open the .pst file created by the Outlook Using Outlook 5
Q Undisclosed recipients does not include sender Using Outlook 1
N Does a Shared Folder Policy override a Digital Signature Setting for macros? Outlook VBA and Custom Forms 6
E What does mean this icon at the picture attached? Using Outlook 2
O Windows 10 x64 Outlook 2013 - URL does not open (anymore) Using Outlook 3
M How does Outlook determine item numbers in a folder? Outlook VBA and Custom Forms 3

Similar threads

Top