WshShell.Popup does't timeout

Status
Not open for further replies.

JAWChemist

Member
Outlook version
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>
 
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.
 
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.
 
Status
Not open for further replies.
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
D Send on behalf of does not store the base mailbox Using Outlook 0
e_a_g_l_e_p_i Why does MS do these things???? Using Outlook 4
M "Attachment Detacher for Outlook" add in, does it update the server copy of the email? Using Outlook 1
Witzker Outlook 2019 Edit contact from email does not open the user defined contactform Using Outlook 3
J Event/Meeting in Outlook Does Not Align with SharePoint Calendar Using Outlook 5
C Code to move mail with certain attachment name? Does Not work Outlook VBA and Custom Forms 3
J Does the .fdm contain my custom form? How to make ol use it? - ol2007 Outlook VBA and Custom Forms 4
C Why does Outlook (desktop) 365 for Windows keep making me input my passwords? Using Outlook 12
G Script does not exist Outlook VBA and Custom Forms 0
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 0
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

Similar threads

Back
Top