UtterAccess.com
We have detected that you are using an unsupported web browser. We recommend you to upgrade your web browser to get the most from UtterAccess forums.
Why should and how can I upgrade?
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Runtime Error 287    
 
   
psalmon
post Jul 26 2010, 04:26 PM
Post #1

UtterAccess Addict
Posts: 185
From: Vancouver, B.C. Canada



I have a client running Office 2003. We have automated emails that run from Access and have for some time (years).
He are using Express Click Yes 1.2 to bypass the Outlook messages, but are not even getting this far.

There were some Microsoft updates done to the server over the weekend and now the jobs from Access are failing with
Runtime error 287. The IT guys have backed out all of the updates that have a "removing" option and the jobs still fail.

I am assigning various Outlook.Mailitems using the code below. When I set a breakpoint at .send I can see that some of the variables are working and others not.
.To
.CC
.body
Have the error
.Subject
.BodyFormat
.Importance
Have the correct values
Here is the code.
CODE
Dim objOutlookMsg As Outlook.MailItem
    With objOutlookMsg
        
        ' Add the To recipients to the e-mail message.
        
        .To = TheTOAddress
        .CC = strCC
        
    
        ' Set the Subject, the Body, and the Importance of the e-mail message.
        .Subject = Trim(ShortageType & "  " & "Shortage #") & Shortage & " - " & StatusDescription & " - " _
         & Material & " - " & MaterialDescription 'Forms!frmMail!Subject
        .BodyFormat = olFormatHTML
        
        strBody = "Shortage #" & Shortage & " has been assigned to you by " & Initiator & vbCrLf & vbCrLf _
        & "Material - " & Material & " - " & MaterialDescription & vbCrLf & "Status - " & StatusDescription & vbCrLf _
        & "Line Stop Date - " & ShortageDate
        
        .Body = strBody
        .Importance = olImportanceHigh  'High importance
  
        .Send
    End With

Has anyone come across this problem? Any suggestions on other methods to have automated emails will be greatly appreciated.
Thanks,
Pat
Go to the top of the page
 
+
Keith Mueller
post Jul 26 2010, 07:29 PM
Post #2

UtterAccess Guru
Posts: 605



psalmon,
ummm,
Run-time error '287':
Application-defined or object-defined error

It seems as if you may have a bad reference. You could try to:
a) goto to a code module and click menu item--> Tools-References
b) check / fix or remove any "missing" references
if that doesn't work you may want to try and switch to late-binding for your Outlook object
CODE
    Dim olApp As Object
    Dim objOutlookMsg As Object
    Set olApp = CreateObject("Outlook.Application")
    Set objOutlookMsg = olApp.CreateItem(olMailItem)

Good Luck, Have Fun,
Keith
Go to the top of the page
 
+
psalmon
post Jul 27 2010, 09:51 AM
Post #3

UtterAccess Addict
Posts: 185
From: Vancouver, B.C. Canada



Thanks very much for the suggestions.
checked the references and there were none missing. I also tried the late binding. Same result. I did try .display rather than .send. It is odd that the email gets created properly. I don't understand why the .send statement fails though. Just to get through a notification run I am changing .send to .display, but I hope there is a better solution Thanks again,
Pat
Go to the top of the page
 
+
Keith Mueller
post Jul 27 2010, 10:10 AM
Post #4

UtterAccess Guru
Posts: 605



psalmon,
Well, it could be a permision issue on your e-mail server. It's just a guess but you may want to review the e-mail account settings on the Login/Client that is running the application.
Good Luck, Have Fun,
Keith
Go to the top of the page
 
+
Keith Mueller
post Jul 29 2010, 11:01 AM
Post #5

UtterAccess Guru
Posts: 605



Glad you figured it out. *$#% Microsoft ! ... lol ... <
Go to the top of the page
 
+
psalmon
post Jul 29 2010, 12:33 PM
Post #6

UtterAccess Addict
Posts: 185
From: Vancouver, B.C. Canada



No kidding !! <
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Search  ·  Go to Top  ·  Lo-Fi Version Time is now: 1st September 2014 - 01:32 PM