May 25th, 2010, 12:43 PM
-2147319779 (8002801d) Automation Error - Library Not Registered
I created an input request form database using Access 2003 which automatically creates an email using VBA to create the email. In the VBA environment, I selected the reference to the Microsoft Outlook 11.0 Object Library. This program works fine on all computers using Windows XP but we recently purchased a laptop with Windows 7 running Office 2003 and on that computer the runtime error -2147319779 (8002901d) Automation error - library not registered occurs. I believe the problem is a DLL file that is missing but have no idea which DLL file. Does anyone have any suggestions on how to fix this problem? I have included the code and where the error occurs for reference:
Private Sub cmdSubmitRequest()
Dim olApp As Outlook.Application
Dim olNS As Outlook.NameSpace
Dim olfolder As Outlook.MAPIFolder
Dim olMailItem As Outlook.MailItem
Dim varBodyText As Variant
Dim strName As String
Dim strDepartment As String
Dim strChargeNumber As String
Dim strRequiredDate As String
Dim strRequestDate As String
Dim strAddtionalInfo As String
Dim strWorkLocation As String
Dim strProductType As String
strName = "Last Name: "
strDepartment = "Department: "
strChargeNumber = "Charge Number: "
strRequiredDate = "Date Wanted: "
strRequestDate = "Date Written: "
strWorkLocation = "Location: "
strProductType = "Product Type: "
strAdditionalInfo = "Description of Work: "
Set olApp = CreateObject("Outlook.Application") Runtime Error Occurs At This Line of Code
Set olNS = olApp.GetNamespace("MAPI")
Set olfolder = olNS.GetDefaultFolder(olFolderInbox)
Set olMailItem = olfolder.Items.Add("IPM.Note")
This is only partial code. I did not want to bore you with details.
I appreciate any help you can give me. We will be in a transition period for some time running both Windows XP and Windows 7 so this will be an ongoing problem. Thank you for your help.
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!