Please keep us informed.
--
Best regards
Michael Bauer - MVP Outlook
: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <
http://www.vboffice.net/product.html?pub=6&lang=en>
Am Thu, 19 Nov 2009 00:38:01 -0800 schrieb Old Man River:
Thank you for your patience Michael.
Firstly I can assure you that the code is in ThisOutlookSession. the title
of the window is "Microsoft Visual Basic - VbaProject -
[ThisOutlookSession
(Code)]".
So I just tried your suggestions viz:
1. set Macro security to run all macros then
2. removed the certificate.
After both steps I restarted Outlook to no avail. (The Stop remains
commented out.)
The only difference was that I was not prompted to safeve the VBA Project
when I closed Outlook
I have sent a support request to MS.
Many Thanks - Alan
:
If Application_Startup really is in ThisOutlookSession, that's weird.
What
happens if you set macro security to the lowest level?
--
Best regards
Michael Bauer - MVP Outlook
: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <
http://www.vboffice.net/product.html?pub=6&lang=en>
Am Wed, 18 Nov 2009 03:04:03 -0800 schrieb Old Man River:
Just tried it with both Stop's commented out. No change even commented
out
the Private Sub Application_Startup() statement and reentered it. It
just
refuses to fire when I launch Outlook. I have stepped through it and it
works
so it's not an invisible charater in the code or some other such trifle.
:
Have you tried it without calling Stop?
--
Best regards
Michael Bauer - MVP Outlook
: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <
http://www.vboffice.net/product.html?pub=6&lang=en>
Am Wed, 18 Nov 2009 00:25:01 -0800 schrieb Old Man River:
It halts the code a that poind and launches the debugger. Very useful
in
developing event driven code and in debugging large amounts of code
that
you
do not want to have to watch. Unlike setting a breakpoint it suvives
closing
the application and relaunching. Obviously doesn't work in a compiled
.com/.exe file where it acts like an End statement.
Still not making any progress with the Application_Startup problem
though.
:
What do you think a Stop call would do? I'd assume it stops the code
from
any further execution.
--
Best regards
Michael Bauer - MVP Outlook
: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <
http://www.vboffice.net/product.html?pub=6&lang=en>
Am Tue, 17 Nov 2009 09:25:03 -0800 schrieb Old Man River:
I have placed all code in ThisOutlookSession (see below). I have
signed
it
with a certificate using the MS "Digital Certificate for VBA
Projects"
tool.
I have deleted the original VBAProject.OTM file yet still the
Application_Startup sub fails to trigger. Running the Init sub from
the
Tools
- Macro menu does the initilisation and the code then fires when a
reminder
is fired. Why is this happening?
Running under Windows Vista Home Premium
Option Explicit
Public WithEvents objReminders As Outlook.Reminders
Private Sub Initialize_handler()
Set objReminders = Application.Reminders
MsgBox "Reminder handler initialised"
End Sub
Private Sub objReminders_ReminderFire(ByVal ReminderObject As
Reminder)
With ReminderObject
Stop
If .Caption = "Fence Check Reminder" Then
.Item.Display
.Dismiss
End If
End With
End Sub
Private Sub Application_Startup()
Stop
Initialize_handler
Application.ActiveExplorer.WindowState = olMaximized
End Sub
Sub Init()
Initialize_handler
End Sub
:
I have the following code in Class1 code
Option Explicit
Public WithEvents objReminders As Outlook.Reminders
Sub Initialize_handler()
Set objReminders = Application.Reminders
MsgBox "Reminder handler initialized"
End Sub
Private Sub objReminders_ReminderFire(ByVal ReminderObject As
Reminder)
With ReminderObject
' irelevant code removed
.Item.Display
MsgBox .Caption
.Dismiss
End With
End Sub
And this in Module1 code
Option Explicit
Private Sub Application_Startup()
Dim MyClass As New Class1
MyClass.Initialize_handler
End Sub
The "Reminder handler initialized" doesn't get displayed on
starting
Outlook
and the event handler doesn't trigger.
What am I doing wrong?
.
.
.
.