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.  This program works fine on all computers using Windows XP but we recently purchased a computer with Windows 7 and on that computer the runtime error 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 partail 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.

 

Question Info


Last updated May 31, 2019 Views 4,964 Applies to:
Looks like Outlook is not installed on your machine. The experts in this scripting forum might be able to tell you more: http://social.technet.microsoft.com/Forums/en-CA/ITCG/threads.

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

The machine has Office 2003 Professional installed.  I am able to send and receive email normally just not programmatically.  I wonder if the library that is not registered is the vbe6.dll or possibly outlvba.dll.  Has anyone else encountered this problem?

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Hhm . . . did you consider asking the experts in an Outlook forum?

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

I suppose I could try that forum as well.  The specific error is a Microsoft Visual Basic run-time error ' -2147319779 (8002801d) Automation error Library not registered.  I have the correct reference selected (Microsoft Outlook 11.0 Object Library).  I did some more investigating and it appears that I have to reregister the library.  Unfortuneately for me, I do not know what library to register.  Since Windows 7 is relatively new, I suspect more people will run into this problem when trying to automate Outlook 2003 functions using Access 2003 VBA.   

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Hey! Did you manage to figure out the issue? I am receiving the same error but when trying to update a ppt via VBA. the script worked perfectly well on XP but I am having issues with windows 7. Please let me know if you have a solution! 

Thanks

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.

Hey! Did you manage to figure out the issue? Please let me know if you have a solution! 

Might be a long wait. David went home 7 years ago . . .

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.