• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1223
  • Last Modified:

Access Run-Time build give broken or missing reference on Outlook 2003 machines

I have packaged my application and everything worked beautiful on all of the PC's in my office.  I installed on a PC in a remote office which runs Office 2003 and it fails.  I know the error is coming from outlook but I do not know why or how to fix it.  I use the DoCmd.SendObject command in several cases in the db application.  The error says:

Your XXXX database or project contains a missing or broken reference to the file 'UMOUTL~1.DLL'

I have searched and searched but cannot find any solutions to this one.  There were a couple articles on EE but i did not get a fix out of them.  Steps I have taken so far is to make sure there are no missing references (OK), Check to make sure Outlook 12 is not ticked in references (OK).  I am dumbfounded at this issue, can someone point me in the right direction?  I have to have a solution by Monday AM.  Attached is a screen of all the ticked references in the project.
ticked-refs.gif
0
pskeens
Asked:
pskeens
  • 11
  • 10
1 Solution
 
jmoss111Commented:
You said the remote office runs Office 2003 with Outlook 11. I'll bet that you're running Office 12 locally and have Outlook 12 installed.  I don't know but imagine that your app is looking for the OL12 libraries for the Docmd.SendObject. You may have to use a module for the email and use late binding for Outlook so that specific version wont have to be early bound.
0
 
pskeensAuthor Commented:
Yes I do have outlook 12 installed on my PC and they are running 11.  I am not sure exactly how to do what you are suggesting.  Can you provide a bit more details?  Much appreciated.
0
 
jmoss111Commented:
Its been a long time (9 years) since I used the method that you're using for emailing and I don't know but I think that Access just opens a message in Outlook and then goes on about its business. It appears that Access is passing some info that is concerned with the specific version that it was developed on. I've never  used Access 2007 runtime builder but that appears to be whats happening in your case.

I use a method of email that doesn't use Outlook and won't generate the Outlook security messages when trying to email and that is SMTP. I'll attach a simple code module that should work for you and allows an attachment.

Regards,

Jim
Public Sub SendAPStats()
'=====================================================================================
Dim db As dao.Database
Dim ThsDay As String
Dim ThisDay As String
Dim ThisYY As String
Dim ThisMM As String
Dim ThisDD As String
Dim strTo As String
 
Dim strFrom  As String
Dim strTitle As String
Dim rs As Recordset
Dim strMailTo As String
 
Dim txtAttach4 As String
Dim fRetVal As Boolean
Dim strSubj As String
Dim strBody As String
Dim strNoAddr As String
 
Dim strDate As String
Set db = CurrentDb
ThisDay = Date$
ThsDay = Right([ThisDay], 4) & Left([ThisDay], 2) & Mid([ThisDay], 4, 2)
strDate = ThsDay
'=====================================================================================
Dim cdoMessage As Object
Dim objCDOMail As Object
Dim strschema As String
On Error GoTo NoAddr 'ErrorHandler ' Enable error-handling routine.
'======================================================================================
           
            strTo = "one@two.com"
            
            strFrom = "two@three.com"
            'End If
            'If Rs!Email3 Is Not Null Then
                'strCC = strCC & " ; " & Rs!Email3
            'End If
            strSubj = "AP Contact List - " & strDate
            strBody = "See attached"
            'strBCC = Rs!PlantEmailBCC
          ' Enter path to documents to be attached -----------------------------------------
            'txtAttach4 = "C:\Acct\IC_Data\EmailOutputQueue\APAging\APAgingEmailLog_" & strDate & ".xls"
            'sPathFile = txtAttach4
              ' Create the message.
 
            Set cdoMessage = CreateObject("CDO.Message")
            Set objCDOMail = CreateObject("CDO.Configuration")
            strschema = "http://schemas.microsoft.com/cdo/configuration/"
            objCDOMail.Load -1 ' CDO Source Default
            'If you have illegal or wrong smtp address here it will run for 30-60
            'seconds and finally give transport error
            With objCDOMail.Fields
                            .Item(strschema & "sendusing") = 2 ' cdoSendUsingPort
                            .Item(strschema & "smtpserver") = "999.999.999.999" ' "Your SMTP server address here"
                            .Item(strschema & "smtpserverport") = 25 'specify port number
                            .Item(strschema & "smtpconnectiontimeout") = 120
 
                            .Update
            End With
 
            With cdoMessage
                Set .Configuration = objCDOMail
                    .To = strTo
                    .From = strFrom
                    
DoSubject:
                    
                    .Subject = strSubj
                    .TextBody = strBody
                    .AddAttachment txtAttach4
                    
                    .send
            End With
            
            Set cdoMessage = Nothing
            Set objCDOMail = Nothing
            GoTo ImDone ' Exit to avoid handler.
            
NoAddr:
ErrorHandler: ' Error-handling routine.
            Debug.Print Err.Number & "-" & Err.Description
            Set cdoMessage = Nothing
            Set objCDOMail = Nothing
            
ImDone:
            
            DoCmd.Quit
End Sub

Open in new window

0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
pskeensAuthor Commented:
If I am emailing a report within Access what would the path be in this part of the code?

' Enter path to documents to be attached -----------------------------------------
            'txtAttach4 = "C:\Acct\IC_Data\EmailOutputQueue\APAging\APAgingEmailLog_" & strDate & ".xls"
            'sPathFile = txtAttach4
              ' Create the message.
0
 
jmoss111Commented:
Path to where excel file is stored.
0
 
pskeensAuthor Commented:
Its not an excel file though.  I am sending a report that is within Access itself.  Report is called "RLM Issue", and its not outputted anywhere, it just opens the report and sends when needed.  Thanks
0
 
jmoss111Commented:
Attach whatever file type you want to attach; but you have to have a file to attach unless you want to insert into the body of the mail.
0
 
pskeensAuthor Commented:
So would this be correct?

            txtAttach4 = "RLM Issue"
            sPathFile = txtAttach4
0
 
pskeensAuthor Commented:
NeverMind.  I added the following code and it seems to work so far.

One more question.  What would be a good solution for having a common SMTP server to send these emails from?  I don't want to use the company SMTP address because all offices does not use the same one.  Any ideas?

Dim db As dao.Database
Dim ThsDay As String
Dim ThisDay As String
Dim ThisYY As String
Dim ThisMM As String
Dim ThisDD As String
Dim strTo As String
 
Dim strFrom  As String
Dim strTitle As String
Dim rs As Recordset
Dim strMailTo As String
 
Dim txtAttach4 As String
Dim fRetVal As Boolean
Dim strSubj As String
Dim strBody As String
Dim strNoAddr As String
 
Dim strDate As String
Set db = CurrentDb
ThisDay = Date$
ThsDay = Right([ThisDay], 4) & Left([ThisDay], 2) & Mid([ThisDay], 4, 2)
strDate = ThsDay
 
DoCmd.OutputTo acOutputReport, "RLM Issue", acFormatPDF, "C:\Windows\Temp\RLMIssue_" & strDate & ".pdf" _
    , , , , acExportQualityPrint
 
 
'=====================================================================================
Dim cdoMessage As Object
Dim objCDOMail As Object
Dim strschema As String
On Error GoTo NoAddr 'ErrorHandler ' Enable error-handling routine.
'======================================================================================
           
  Dim RlmEmail As String
  Dim UserEmail As String
  Dim Mill As String
  RlmEmail = Me.RlmEmail
  UserEmail = Me.UserEmail
  Mill = Me.cboMill.Value
  
            strTo = RlmEmail
            
            strFrom = UserEmail
 
            strSubj = Mill & " RLM Issue - " & strDate
            strBody = "See attached for the submitted RLM Issue"
 
          ' Enter path to documents to be attached -----------------------------------------
            txtAttach4 = "C:\Windows\Temp\RLMIssue_" & strDate & ".pdf"
            sPathFile = txtAttach4
              ' Create the message.
 
            Set cdoMessage = CreateObject("CDO.Message")
            Set objCDOMail = CreateObject("CDO.Configuration")
            strschema = "http://schemas.microsoft.com/cdo/configuration/"
            objCDOMail.Load -1 ' CDO Source Default
            'If you have illegal or wrong smtp address here it will run for 30-60
            'seconds and finally give transport error
            
                        With objCDOMail.Fields
              .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
              .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.zoominternet.net"
              .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
              .Item("http://schemas.microsoft.com/cdo/configuration/authenticate") = cdoBasic
              .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xxxxx"
              .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxxx"
              .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
              .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
              .Update
            End With
 
            With cdoMessage
                Set .Configuration = objCDOMail
                    .To = strTo
                    .From = strFrom
                    
DoSubject:
                    
                    .Subject = strSubj
                    .TextBody = strBody
                    .AddAttachment txtAttach4
                    
                    .send
            End With
            
            Set cdoMessage = Nothing
            Set objCDOMail = Nothing
            GoTo ImDone ' Exit to avoid handler.
            
NoAddr:
ErrorHandler: ' Error-handling routine.
MsgBox Err.Description
Me.Undo
 
'            Debug.Print Err.Number & "-" & Err.Description
'            Set cdoMessage = Nothing
'            Set objCDOMail = Nothing
            
ImDone:
            
            Dim sFileType As String ' Declare the Type of File
            Dim sTempDir As String ' Temporary Directory
            
            
            'On Error Resume Next
            
            'sFileType = "*.tmp"
            sTempDir = "c:\windows\Temp\RLMIssue_" & strDate & ".pdf" ' There might be mutiple temp directories (one for each profile) in Windows XP. Modify the code accordingly
            
            Kill sTempDir '& 

Open in new window

0
 
pskeensAuthor Commented:
So no ideas on the SMTP Solution??  Thanks
0
 
jmoss111Commented:
There are services and also I think that you can actually use Google, but you'd have to search for that. You could localize by office if there is a server at each office; account just has to be set up.
0
 
pskeensAuthor Commented:
Actually I looked at our email addresses and the SMTP is for each person and its their email address.  So I'm not thinking thats a good solution at all.  Maybe google, but I know that I cannot use my yahoo address as I cannot get it to authenticate at all.  Thanks
0
 
jmoss111Commented:
I'm pretty sure that you can use SMTP at Google, but just don't know the particulars. I'm glad that the SMTP solution is working for you.
0
 
jmoss111Commented:
0
 
pskeensAuthor Commented:
Thanks for the help.  I registered and now have a gmail account to use only for this application, however I cannot get the email to send using the gmail SMTP scheme.  Do you see anything wrong with the below code?

                       With objCDOMail.Fields
              .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
              .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
              .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587
              .Item("http://schemas.microsoft.com/cdo/configuration/authenticate") =  cdoBasic
              .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xxxxxxxxx@gmail.com"
              .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "xxxxxxx"
              .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
              .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
              .Update
            End With
0
 
jmoss111Commented:
I see nothing wrong but haven't use gmail to send. If the parameters are correct I see no reason why it won't work. I assume that you obtained the parameters for .fields from google.

Do you get any errors?
0
 
pskeensAuthor Commented:
Yes I got the smtp parameters from google/gmail.  One thing is that you have to use tls authentication and that might be the problem.  We are using cdoBasic.  
0
 
jmoss111Commented:
I haven't a clue; I basically use SMTP from Exchange and everything works great. Since your corp has an exchange server that is what I would pursue.
0
 
pskeensAuthor Commented:
Oh, well.  Scratch gmail.  I went back to using my ISP SMTP Server.  I will test tomorrow on the network and see if it is okay or not.  Thanks for all your input.
0
 
jmoss111Commented:
You're welcome. I wish that I could assist you further with gmail...
0
 
pskeensAuthor Commented:
Well after I took all the DoCmd.SendObject out of the entire app and using SMTP I am still getting the same error at start up of the application.  Still referencing that I have a broken or missing reference UMOUTL~1.dll

0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

  • 11
  • 10
Tackle projects and never again get stuck behind a technical roadblock.
Join Now