Running any macro crashes OL2002

N

Neil

My previous problem has returned.
Win2K with SP4, Mcafee installed, new machine.
Running any macro now crashes OL2002. Redemption installed. OsaSync
installed
Old machine with same setup worked fine.
I see that the 'trust vba project' option under Security is grayed out.
How do I get this un-grayed out?
Driving me nuts - any clues gratefully accepted
Neil
 
N

Neil

The code in the module (the only code) is as shown below. It worked for a
while recently then stopped.
It crashed when it reaches "set myolapp= createobject...

Does this help?


Dim myolApp As Object
Dim myMessageItem As Object
Dim myAttachmentItems As Object
Dim myJobnumber As String
Dim MyDrive As String
Dim Title As String

Title = "Whizzomatic System"
Set myolApp = CreateObject("Outlook.Application")
Set myMessageItem = myolApp.ActiveInspector.CurrentItem
Set myAttachmentItems = myMessageItem.Attachments

myJobnumber = InputBox("Job Number prefix?", Title, "99999")
If myJobnumber = "" Then GoTo Getout
MyDrive = InputBox("Save on which drive?", Title, "P:\")
If MyDrive = "" Then GoTo Getout

For Each myAttachmentItems In myAttachmentItems
myAttachmentItems.SaveAsFile MyDrive & myJobnumber & "-" &
myAttachmentItems.DisplayName
Next

Getout:
Set myolApp = Nothing
Set myMessageItem = Nothing
Set myAttachmentItems = Nothing
 
K

Ken Slovak - [MVP - Outlook]

N

Neil

Success!
I went into the McAfee setup gizmo and disabled the Hawk Script spoofer
gizmo from there - the macros run fine now
It gets complicateder and complicateder every day...
Neil

Neil said:
I did have it installed then 'disabled' it under the add-ins as part of my
testing routine but the problem persisted. Maybe I should uninstall it
totally?
I'll give it a whirl.
thanks - we'd be adrift if it weren't for you MVPs!

Ken Slovak - said:
Are you running McAfee's Hawk Script Stopper? See if you still have
the problem if you disable Hawk. It causes lots of problems and
crashes.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


Neil said:
The code in the module (the only code) is as shown below. It worked for a
while recently then stopped.
It crashed when it reaches "set myolapp= createobject...

Does this help?


Dim myolApp As Object
Dim myMessageItem As Object
Dim myAttachmentItems As Object
Dim myJobnumber As String
Dim MyDrive As String
Dim Title As String

Title = "Whizzomatic System"
Set myolApp = CreateObject("Outlook.Application")
Set myMessageItem = myolApp.ActiveInspector.CurrentItem
Set myAttachmentItems = myMessageItem.Attachments

myJobnumber = InputBox("Job Number prefix?", Title, "99999")
If myJobnumber = "" Then GoTo Getout
MyDrive = InputBox("Save on which drive?", Title, "P:\")
If MyDrive = "" Then GoTo Getout

For Each myAttachmentItems In myAttachmentItems
myAttachmentItems.SaveAsFile MyDrive & myJobnumber & "-" &
myAttachmentItems.DisplayName
Next

Getout:
Set myolApp = Nothing
Set myMessageItem = Nothing
Set myAttachmentItems = Nothing



My previous problem has returned.
Win2K with SP4, Mcafee installed, new machine.
Running any macro now crashes OL2002. Redemption installed. OsaSync
installed
Old machine with same setup worked fine.
I see that the 'trust vba project' option under Security is grayed out.
How do I get this un-grayed out?
Driving me nuts - any clues gratefully accepted
Neil
 
K

Ken Slovak - [MVP - Outlook]

It gets better. Earlier versions of Hawk were fine with addins if you
told Hawk to trust the addin and all its components. For me that's
usually addin.dll, addin.ocx (for the property page) and AddInMon.exe
(for problems with starting Outlook with no UI like ActiveSynch does).
Now trusting the components seems to work only half the time and
McAfee of course won't admit it's a problem with Hawk. Even signing
all the components and the installation MSI with my code signing
certificate plus the trusting in Hawk doesn't always work.

The more reliable fix so far, and it doesn't work all the time or with
all Hawk versions, is to stop Hawk, shut down the AV software, install
your addin, reboot, then tell Hawk to trust the components, then
reboot again, then let Hawk and the AV software start up.

For debugging, just completely disable Hawk.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top