VBA, Outlook and Excel: how to inhibite Outlook popup that blocks automatic operations?

Nelson78

Well-known Member
Joined
Sep 11, 2017
Messages
526
Office Version
  1. 2007
Hello everybody.

I have built a hybrid process that engages both Microsoft Excel 2007 and Microsoft Outlook 2007.

The process is triggered by an incoming e-mail sent by a specific sender at any hour at minute 15.
With VBA instructions set in Outlook, the mail .xls attachment is used to update an .xls report and, still automatically, this report is sent to colleagues all over the firm.
The process works very well taking a couple of minutes from the delivery of the mail that triggers the operations and without affecting my regular activity. The process works all night, with my pc always on.

The only problem I've bumped into is about an Outlook popup that requests entering username and password (see https://imgur.com/a/lqXwsn2 ), a request that from my point of view is not justified by anything.

Of course, this popup is a sort of blockage: it is necessary to confirm "OK" to allow working the automatic process. This implies that when it occours through the night, the report is not sent for hours, until I join my workplace and click "OK".

Now, due to safety restrictions set by IT, I'm not able to inhibite this pop up by manipulating the Outlook settings.

Now, I think the best solution is a macro from an Excel workbook (always open) that any hours at the minute 15 or so, checks the presence of the popup in Outlook: if yes click ok, if not do nothing.

Could you support me in this operation?

Thank you in advance.

Paolo
 
Going a little deeper than I anticipated :) but it gives me the opportunity to learn.

There are too many variables for me to give you an exact solution but maybe this will help point you in the right direction.

https://answers.microsoft.com/en-us...xcel-vba/ccdee036-1755-4589-a79a-94f7b899b3f6

http://www.vbforums.com/showthread.php?558785-Get-Active-Window

You need to figure out what the name of the window is and then look for it, if it exists trigger the click. Let me know if you get stuck and I will see if I can assist further.

It seems I've figured it out (a couple of times the alert has been managed in the desired way).

There is still some things unclear: for example, I've add the following instruction, but maybe it is unnecessary (perhaps the focus is automatically on the alert regardless this instruction).

Code:
Set objShell = CreateObject("WScript.Shell")
objShell.AppActivate "Enterpassword#32770"
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,223,714
Messages
6,174,052
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top