Results 1 to 5 of 5
  1. #1
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts

    Automation Error (Word / Outlook 2003 SP3)

    I have a macro that uses Redemption to pull contacts from Outlook and display them in a userform in Word.

    It works just fine on one of my computers, whether Outlook is open or not. But the identical code throws an "Automation error -- The specified module could not be found" if Outlook is closed. If I open Outlook, it runs fine.

    The code doesn't balk at a Redemption call, though I have unregistered and reregistered it, just in case. Here's the code in question:

    Set Session = CreateObject("Redemption.Session")
    If Session.LoggedOn = False Then Session.Logon
    Set oNSP = Outlook.Session <<---------- THIS LINE DOESN'T WORK IF OUTLOOK IS CLOSED

    I've repaired Office, replaced Redemption and reregistered it. I'm using SP3 on all computers. I'd like to not have to reinstall everything...

    Does anyone have any suggestions on where to start troubleshooting now?
    Thanks, <img src=/S/bananas.gif border=0 alt=bananas width=33 height=35>
    Kim

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Automation Error (Word / Outlook 2003 SP3)

    <hr><code>Set oNSP = Outlook.Session <<---------- THIS LINE DOESN'T WORK IF OUTLOOK IS CLOSED</code><hr>
    That seems logical, I mean, does Outlook refer to the Outlook application? If Outlook is not running, I don't understand how one can access its current session.

  3. #3
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts

    Re: Automation Error (Word / Outlook 2003 SP3)

    Hi Jefferson,

    Logic? Logic?! We don't need no stinkin' logic!! (Or at least, we don't seem to have no stinkin' logic...)

    I would agree with you if the code always threw an error, but it doesn't. The preceding line of code logs me onto a shadow session of Outlook (or does on my two other computers). And the inconsistency is driving me crazy.
    Thanks, <img src=/S/bananas.gif border=0 alt=bananas width=33 height=35>
    Kim

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Automation Error (Word / Outlook 2003 SP3)

    If you have Outlook ask you which profile to use at launch, that can create issues. Otherwise, it seems safest to create your Outlook object explicitly. <img src=/S/duck.gif border=0 alt=duck width=23 height=23>

  5. #5
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    716
    Thanks
    10
    Thanked 34 Times in 28 Posts

    Re: Automation Error (Word / Outlook 2003 SP3)

    OK, I solved it. Not as radically as rebuilding my computer...

    I became more convinced that something was missing or broken on that computer. So I uninstalled Outlook and reinstalled it. Now the code works.

    Doh!
    Kim <img src=/S/bananas.gif border=0 alt=bananas width=33 height=35>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •