Link to home
Start Free TrialLog in
Avatar of brake4blonds
brake4blondsFlag for United States of America

asked on

VB6 Outlook banner page

I have a VB6 program that I have written that read the inbox of a profile that i have setup in Outlook.  It is a corporate email system I might mention as well.

Anyway, when I open the Outlook appliclation via the program there is what I would call a banner page of sorts.  It is something that is specific to the corporation that I work for.  Either way, when I close the Outlook application via my program the banner page is still active and will cause a read of memory error.  If by chance I close the pop up banner page during the execution of my program it will not have this problem.  Is there anyway to stop the banner page from opening up or close it via my exe so I don't have the reading of memory error?

There is a ok button that can be clicked to close the banner but how do I go about doing that via the program?

Thanks

Avatar of Rob_Jeffrey
Rob_Jeffrey

How are you closing the Outlook application via your program?
Are you sending the windows message WM_Close?
Avatar of brake4blonds

ASKER

When I close the outlook application I do the following:

appNameSpace.Application.Quit
app.Application.Quit
app.Quit

Then I set them to nothing

set appNameSpace = nothing
set app.Application.Quit= nothing
set app = nothing

Then I return back to main() and then I get the error.
Can you run a delay of sorts between calling the close and setting to nothing?
Perhaps the close is taking longer?
I figured it out.  

There was a set statement where I was release a part of memory that was there anymore anyway so when I tried to set it to nothing it was throwing the error.
Well, I thought that was it...hmmmm...
Is your program trying to get the current number of emails?
If it is a pop3 server take a look at this ->http://vbaccelerator.com/codelib/submit/e-checker.zip
(This would mean a re-write of the code - but it works fine)

This method of closing the application is alien to me so I am afraid I am not much help.
It is not a pop3 server but an internal exchange account for the company that I am working for.  

The Outlook application is on the server and my local PC.  

Once the program opens the Outllook in the background (visible=false), it runs fine as far as reading, marking as read, and moving to another subfolder.  It is just when I close the application that I get the memory error.  I am not sure if it is because of the flash banner that is visible or there is something else that is going on.  

If there was a way to surpress the banner page and/or close it before I quit the application I may be able to get around the problem.  This is what I really would like to know how to do more than anything.  I was thinking that I would be able to do this be send keys or something but I am not sure that it would be possible in this particular case.



ASKER CERTIFIED SOLUTION
Avatar of Rob_Jeffrey
Rob_Jeffrey

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That worked.  No longer getting the memory area.  This allowed for the flash window to be closed and didn't receive the memory error.

Thanks
Awesome!

Glad I could help.