Re: Macros and Outlook?

From: BruceJ (oe*NOSPAM*
Date: 11/06/03

Date: Thu, 06 Nov 2003 21:43:03 GMT

Did you restart Outlook after changing the macro security setting to Low?
>I thought I did... I did restart again and my Hello World worked.
Now I am getting
run-time error '424':
Object required
and debug puts me at
    For Each objSRecip In objSMail.Recipients
objSMail.Recipients = nothing when I place my mouse over it.


"Sue Mosher [MVP]" <> wrote in message
Did you restart Outlook after changing the macro security setting to Low? If
so, does any other VBA code run? Write a "hello world" MsgBox routine if you
need something to test. Did you try putting a breakpoint in the Application_
ItemSend() event handler?

You can make a basic check of whether there's a problem with Redemption by
looking at Tools | Options | Other | Advanced Options | Addin Manager. It
should appear there.

> Also, how whould I change the contact address book to work with? Would I
> change the line
> Set colContacts = objNS.GetDefaultFolder(olFolderContacts).Items
> To something like Set colContacts = “NewAddressBook”

Contacts folders and address books are *not* the same thing, so I'm not sure
what you're getting at.

Sue Mosher, Outlook MVP
Outlook and Exchange solutions at
Author of
     Microsoft Outlook Programming: Jumpstart
     for Administrators, Power Users, and Developers
"BruceJ" <oe*NOSPAM*> wrote in message
> I D/L redemption, and installed it. I then tried to register it in VB (I
> have 2 entries for SafeOutlookLibrary and both point to redemption.dll)
> I restarted OL 2002, I got an error that it could not find extend.dat (or
> extra.dat if I look in event log. I THOUGHT it said extend.dat ) (I
> the message, as I thought I would be able to get it again by restarting
> I have not been able to get the error again….)
>  I have pressed ALT-11, starting the VBA editor, and then browsed to
> ThisOutlookSession and pasted the whole code section there. I have since
> moved all but the first section into a diff module.
> I then tried to run it by creating a new email to a address that was not
> the contacts folder. I did not get any response. I then put a msgbox in
> code, expecting it to pop the message box, it did not. I am NOT familiar
> with O/L for VBA, but I have done some in EXCEL, so it SHOULD be similair…
> I have not tried any other VBA code. I have not had any need for it. what
> would be a good one to just test something?
> I have signed the code with selfcert and I have also put security to LOW.
> "Sue Mosher [MVP]" <> wrote in message
> news:ubiomyIpDHA.2652@TK2MSFTNGP09.phx.gbl...
> Did you check your macro security settings -- Tools | Macro | Security?
> other VBA code run?
> If you're using Excel to send out the mail, then you should be able to
> the code I provided to add the same functionality (checking addresses and
> creating contacts) to your Excel routines.
> "BruceJ" <oe*NOSPAM*> wrote in message
> news:M3vqb.128842$HS4.1023070@attbi_s01...
> >
> > Thanks for the link!
> > I tried the code, but, it did not work....
> > I even put a msgbox inthe code so I could see if it was getting to the
> code.
> > It is not. I did put it in the correct folder, as per the instructions.
> >
> > Back to the origianal issue...
> >
> > Now, is there a way, I can do something similar from EXCEL? I use the
> to
> > send out all of the email I am actually looking for. All of the email I
> send
> > out of OL, I don't need to put into the fold, as I do not need to follow
> > their email perse. Or does it need to be called from Outlook?
> >
> > "Sue Mosher [MVP]" <> wrote in message
> > news:uTFs62LoDHA.2456@TK2MSFTNGP09.phx.gbl...
> > Great, Bruce. You might find this code useful, too:
> >

Relevant Pages

  • Re: OL2003 Crashes and Restarts - Crashes and Restarts
    ... needed repair so I simply exited and restarted thinking it would repair ... For example in the inbox I have message collapsed. ... I'm using the default Outlook profile. ... A dialog pops up to notify Microsoft and it includes a 'restart' ...
  • Re: Outlook VBA brings up addin error
    ... It's not customary to refer to VBA code as a script. ... If you are in fact running Outlook VBA code, ... > Dim myOlApp As Outlook.Application ...
  • Re: "Run a script" rule triggers but script does not execute
    ... Sue Mosher, Outlook MVP ... Does other VBA code run? ... Set olNS = Application.GetNamespace ... Set olMail = Nothing ...
  • Re: Users can see all details of my appointments
    ... Close and restart Outlook. ... | me being able to see other's calendar details. ... | clients", but I closed Outlook on their machines and that didn't ...
  • Re: How did a NOTE get in my Inbox?
    ... >> Resolve the problem by declaring your object as Object not MailItem. ... Sue Mosher, Outlook MVP ... > have recently run into a situation that causes my VBA code to fail. ... > message to a TXT file, and then deletes the mail item from the Inbox. ...