1 Attachment(s)
VB6 - Auto accept Outlook Security Message
Did you ever get this anoying message when accessing Outlook from your program ?
http://www.vbforums.com/attachment.p...id=51131&stc=1
Recently I had this problem, I asked for help, and got the anser myself here:
[RESOLVED] How can i get rid of this anoying message ?
Well the solution is simple, there are only a 2 main steps:
Find the Outlook window
When found, SendKeys to select the options, and click the "Yes" button.
The problem is that Outlook freezes your program while the window is showing, so the anser is to put all the code that closes the window, either in another application, or an ActiveX EXE (since it is in another thread).
You will find attached 2 projects, one is the ActiveX EXE, and the other is a regular application that is using Outlook.
First start the ActiveX EXE (KillOutlookMSG.vbp), and then start the UseOutlook.vbp.
Make sure the references are still there !
UseOutlook.vbp has a reference to Outlook, and another to the ActiveX EXE KillOutlookMSG.vbp
Re: VB6 - Auto accept Outlook Security Message
Yes, that is the solution but using a timer and sendkeys is still not 100% reliable but does work for the most part. I did something similar with an out of process thread but used a complete api solution for more reliability. Hooking the dialog creation instead of polling a timer for a reduced resource effect.
My freeware Outlook DismissMe⢠code does this too. :D. Only problem was that "Click Yes" is so dominant that I never got mine to take off. I wanted to charge a nominal fee for it but changed it to freeware after I see the lack of response due to Click Yes being free.
In Outlook 2007 the security rules have been dramatically relaxed. If the system is found to be running an antivirus software. Microsoft said they are loosening it up and letting the system rely upon the AV for most of its protection.
Oh and dont forget that different security issues have a different security dialog box. ;)
Cheers on another great Code Bank entry! :thumb:
Re: VB6 - Auto accept Outlook Security Message
Quote:
Originally Posted by RobDog888
... Cheers on another great Code Bank entry! :thumb:
Thank you :) :wave:
Quote:
Originally Posted by RobDog888
... Hooking the dialog creation instead of polling a timer for a reduced resource effect.
I've never seen it done, do you have an example ?
Also... I don't mind if you post your solution(s) too (or links to them).
Re: VB6 - Auto accept Outlook Security Message
Actually its on my server which the HD or AD is messed up. I already have another hd and am installing a new instance of 2003 server so I can try to gain access to my data. I think I should be able to get it soon.
When I get my site back up I can PM you the link as I cant advertise my site on vbf ;)
A system wide hook can be setup with SetWindowHookEx - http://msdn.microsoft.com/library/de...ns/cbtproc.asp to catch the window being created before it even gets displayed.
Re: VB6 - Auto accept Outlook Security Message
For some reason it doesn't do anything on my PC ? ....
Using your code, that message is still there.... :ehh:
WithEvents CheckOutlook As cls...
gives and error: UserDefined type not defnied
2 Attachment(s)
Re: VB6 - Auto accept Outlook Security Message
Quote:
Originally Posted by rookie7799
For some reason it doesn't do anything on my PC ? ....
Using your code, that message is still there.... :ehh:
WithEvents CheckOutlook As cls...
gives and error: UserDefined type not defnied
As I was saying in the first post, make sure the references are still correct.
Make sure the KillOutlookMSG is compiled first ! (or Run it in the IDE)
Then if you go to "Project" menu, click on "References", you should NOT see any "MISSING" in front of the reference.
So, if it looks like this:
http://www.vbforums.com/attachment.p...id=51922&stc=1
Then uncheck the MISSING one, and click "OK"
Go back to the references window, and scroll down to "KillOutlookMSG", and make sure it is checkmarked !
Re: VB6 - Auto accept Outlook Security Message
Using CVMichael's ActiveX works, but the ActiveX remains loaded (shows up in Task Manager) even after closing the calling application. This is even though I implemented the code in Query Unload of the calling form:
-------------------------------------
If Not (CheckOutlook Is Nothing) Then
CheckOutlook.Enabled = False
DoEvents
Set CheckOutlook = Nothing
End If
-------------------------------------
Any idea on how I can make sure the ActiveX gets unloaded from memory when the main app closes?
Re: VB6 - Auto accept Outlook Security Message
An ActiveX is supposed to be loaded at all times... I don't think there is a way to properly close it.