Hi Jim,
Okay, let's first try eliminating the DAO Object Library as a potential
source of error, since this library is being loaded in the cut-down version.
Search your hard drive for the file named DAO360.dll. What version do you
have? I have version 3.60.8618.0 for Office XP. Ignore any copies that are in
folders that include ServicePackFiles or dllcache in the folder name. For
example, my copy is found in the following folder:
C:\Program Files\Common Files\Microsoft Shared\DAO
Use the instructions shown in step 5 of this KB article to re-register the
DAO file:
http://support.microsoft.com/?id=303769
For step #5, please note that it is important to include a set of quotes
around the full path to the DAO360.dll file. For example, on my PC the
following path is valid, however, this command will fail:
regsvr32 C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll
with a LoadLibrary error. You need to include the quotes, like this, for
this command to be successful:
regsvr32 "C:\Program Files\Common Files\Microsoft Shared\DAO\dao360.dll"
Use the path that is valid for your PC. An easy way to do this is to try
searching for each .dll file that you need to re-register. When the search is
complete, reduce the size of the find files dialog enough so that you can
display both the search results and the Start > Run dialog on the same
screen. Enter the command: Regsvr32 into the Start > Run dialog. Then use
the drag-and-drop technique to drag the dao360.dll file to the Start > Run
dialog. When you drop it in place, the complete path including the
double-quote marks should be filled in automatically.
If you still have no joy after this, then it's time to look into a complete
removal and re-installation of either Outlook 2002 or Office XP. Here is a KB
article that I found for removing Outlook 2000. I don't see a similar article
available for Outlook 2002, but the steps are likely similar:
OL2000: How to Uninstall Outlook from Office 2000
http://support.microsoft.com/?id=257667
Note that this article includes the following at the bottom:
"This process does not remove all of the Outlook 2000 program files from you
hard disk. The registry entries and the icons for Outlook are either disabled
or removed."
You really do want to remove as much as possible, so that a new install
attempt will have a better chance of actually fixing the problem. (Sometimes
existing files are not replaced during re-installs, so it's best to start
with a clean slate). A link at the bottom of this page leads to the following
article, again for Office 2000, but likely similar for Office 2002:
http://support.microsoft.com/?id=219423
Or, you might want to start by using this KB article instead:
How to manually remove the Microsoft Office XP Developer installation from
your computer
http://support.microsoft.com/?id=827428
If you need to go to these extreme steps, make sure you apply the service
packs after re-installing Office XP. I'll include more information on how to
do that later, if you find that you need to do this.
Tom
__________________________________________
:
Hi again .... and thanks for keeping on with this marathon session.
I created a new db2.mdb with a simple "tblMailingList" and the "Sub
SendMessages(Optional AttachmentPath)" subroutine. I commented (') out all
lines following the listing below,except for the "End Sub"
I have the following References (VBA):
Visual Basic For Applications
Microsoft Access 10.0 Object Library
Microsoft DAO 3.6 Object Library
Microsoft Outlook 10.0 Object Library
.... nothing else.
When I run "SendMessages" from the "Immediate" window, I receive the
following error:
Run-time error '48':
Error in loading DLL
I am stumped
Jim
Dim MyDB As Database
Dim MyRS As Recordset
Dim objOutlook As Outlook.Application
'Dim objOutlookMsg As Outlook.MailItem
'Dim objOutlookRecip As Outlook.Recipient
'Dim objOutlookAttach As Outlook.Attachment
Dim TheAddress As String
Set MyDB = CurrentDb
Set MyRS = MyDB.OpenRecordset("tblMailingList")
MyRS.MoveFirst
' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
'Do Until MyRS.EOF
' Create the e-mail message.
'Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
'TheAddress = MyRS![EmailAddress]
<snip>