Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem running macro in module from ThisOutlookSession

468 views
Skip to first unread message

Dan Lehman

unread,
Dec 17, 2001, 6:37:34 PM12/17/01
to
I'm using Neo's macro code (legend!) that removes the pain-in-the-ass little
envelope icon from my taskbar. According the details that I found with the
macro, it has to run from its own module and not within ThisOutlookSession.

The problem is, I want this macro to run after my mail is processed by some
VBA code in ThisOutlookSession. I've added a call line towards the end of
my session code but it doesn't seem to run.

Any ideas?

--
______________________________________________________________

Dan Lehman
Dan dot Lehman at techie dot com

Note: Remove NOSPAM. & .NOSPAM before replying.

Sue Mosher

unread,
Dec 17, 2001, 7:25:39 PM12/17/01
to
Post the code you're using to call Neo's routine?

--
Sue Mosher, Outlook MVP
Outlook and Exchange Solutions
at http://www.slipstick.com

"Dan Lehman" <NOSPAM.D...@techie.com.NOSPAM> wrote in message
news:10086322...@excalibur.osa.com.au...

Dan Lehman

unread,
Dec 17, 2001, 7:47:41 PM12/17/01
to
All I'm using from ThisOutlookSession is:

call RemoveNewMailIcon

RemoveNewMailIcon is a sub stored in a module:

Sub RemoveNewMailIcon()
EnumWindows AddressOf EnumWindowProc, 0
End Sub


--
______________________________________________________________

Dan Lehman
Dan dot Lehman at techie dot com

Note: Remove NOSPAM. & .NOSPAM before replying.

"Sue Mosher" <sue...@slipstick.com> wrote in message
news:O9uAc01hBHA.1088@tkmsftngp02...

Sue Mosher

unread,
Dec 18, 2001, 7:26:01 AM12/18/01
to
So what's the exact problem? Is the other code in that procedure running or
is just the call to the RemoveNewMailIcon sub a problem?

"Dan Lehman" <NOSPAM.D...@techie.com.NOSPAM> wrote in message

news:10086364...@excalibur.osa.com.au...


> All I'm using from ThisOutlookSession is:
>
> call RemoveNewMailIcon
>
> RemoveNewMailIcon is a sub stored in a module:
>
> Sub RemoveNewMailIcon()
> EnumWindows AddressOf EnumWindowProc, 0
> End Sub
>

Dan Lehman

unread,
Dec 18, 2001, 3:10:26 PM12/18/01
to
Well that's just it. It *appears* to be running (as I don't get any errors)
but the macro isn't actually doing its job. I know that the macro works
because I can run it manually and it works just fine.

If I change the macro name (to a non-existent one) in my call line, I get an
error, as expected.

I'd paste the macro here but I haven't changed it from Neo's original code
at all. You've probably already seen it at
http://www.slipstick.com/dev/code/clearenvicon.htm.

The Slipstick page discusses running it from a private sub in
ThisOutlookSession. I have a private sub in there:

Private Sub olInboxItems_ItemAdd(ByVal Item As Object)

This sub does some checking on messages as they arrive in my Inbox and moves
them, marks them as read, etc and then attempts to call Neo's macro to clear
the icon from my system tray.

Everything else in my sub works fine - it just appears that the macro isn't
being run properly.

--
______________________________________________________________

Dan Lehman
Dan dot Lehman at techie dot com

Note: Remove NOSPAM. & .NOSPAM before replying.

"Sue Mosher" <sue...@slipstick.com> wrote in message

news:OhWsS4#hBHA.2568@tkmsftngp03...

Sue Mosher

unread,
Dec 19, 2001, 8:22:46 AM12/19/01
to
You might put a Stop in the code to give you a chance to run it in debug
mode when your proc calls the macro. Or contact Neo directly to see if he
has any ideas.

"Dan Lehman" <NOSPAM.D...@techie.com.NOSPAM> wrote in message

news:10087062...@excalibur.osa.com.au...

Dan Lehman

unread,
Dec 19, 2001, 4:14:59 PM12/19/01
to
I'll give it a go. Thanks.

--
______________________________________________________________

Dan Lehman
Dan dot Lehman at techie dot com

"Sue Mosher" <sue...@slipstick.com> wrote in message
news:eWxwKEJiBHA.2284@tkmsftngp02...

0 new messages