Getting Outlook DLL Error

JFish

New member
Local time
Today, 05:54
Joined
Jan 4, 2013
Messages
3
I am trying to open Outlook from within Access to extract and load attachments. I am getting an "Error in loading DLL" when first trying to start Outlook.

Global OutLk As New Outlook.Application
Global BuzzsawFldr As Outlook.MAPIFolder
Global BuzzsawProcessedFldr As Outlook.MAPIFolder
Global NewMail As Outlook.MailItem
Global MailAttmnt As Outlook.Attachment

Set OutLk = Outlook.Application
Set BuzzsawFldr = OutLk.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Folders("Buzzsaw")
Set BuzzsawProcessedFldr = OutLk.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Folders("BuzzswProcessed")

I get the error message on the Set Outlk statement. I have the Microsoft Outlook Object Library referencse set.

How do I determine which DLL is causing the issue and what library it is referenced in?

Thanks,
Jim
 
Hello, JFish.. Welcome to AWF.. :)

Well try creating the object before setting it.. and see what happens..
Code:
[COLOR=Blue]Global OutLk As Outlook.Application[/COLOR]
Global BuzzsawFldr As Outlook.MAPIFolder
Global BuzzsawProcessedFldr As Outlook.MAPIFolder
Global NewMail As Outlook.MailItem
Global MailAttmnt As Outlook.Attachment
 
    [COLOR=Blue]Set OutLk = CreateObject("Outlook.Application")[/COLOR]
    Set BuzzsawFldr = OutLk.GetNamespace("MAPI").GetDefaultFolder(olFold  erInbox).Folders("Buzzsaw")
    Set BuzzsawProcessedFldr = OutLk.GetNamespace("MAPI").GetDefaultFolder(olFold  erInbox).Folders("BuzzswProcessed")
I have highlighted the changes I made..
 
Hello, JFish.. Welcome to AWF.. :)

Well try creating the object before setting it.. and see what happens..
Code:
[COLOR=blue]Global OutLk As Outlook.Application[/COLOR]
Global BuzzsawFldr As Outlook.MAPIFolder
Global BuzzsawProcessedFldr As Outlook.MAPIFolder
Global NewMail As Outlook.MailItem
Global MailAttmnt As Outlook.Attachment
 
    [COLOR=blue]Set OutLk = CreateObject("Outlook.Application")[/COLOR]
    Set BuzzsawFldr = OutLk.GetNamespace("MAPI").GetDefaultFolder(olFold  erInbox).Folders("Buzzsaw")
    Set BuzzsawProcessedFldr = OutLk.GetNamespace("MAPI").GetDefaultFolder(olFold  erInbox).Folders("BuzzswProcessed")
I have highlighted the changes I made..

Thanks for the welcome.

Thanks for the suggestion too. I tried it but am still getting the same error message. Outlook starts on my workstation from the icon so I know Outlook runs. Is there a way to increase the information being returned to tell the problem dll? I have looked at the event log for applications but there is nothing in the log pertaining to Outlook that I see. I am wondering if my company has taken some sort of permissions away so outlook cannot be started by an outside program. Any suggestions would be appreciated.
 
I figured it out. The Microsoft Outlook 10.0 Object Library reference file msoutl.olb is in my office10 directory. Sometime in the past, corporate applied a patch that created a second registry entry for msoutl.olb that said the file was in office14 but there is no office14 directory on my workstation. I was not sure about deleting the second, bad, registry entry so I modified it.
1) I backed up my registry
2) Search the registry for msoutl.olb
3) Changed the registry entries that had the path office14 to office10
From: c:\program files\Microsoft office\office14\msoutl.olb
To: c:\program files\Microsoft office\office10\msoutl.olb
4) Saved the registry and rebooted the computer.
5) I was able to start Outlook from within Access to read emails and extract attachments.
 

Users who are viewing this thread

Back
Top Bottom