Microsoft Visual Basic Runtime Error 287
Contents |
be down. Please try the request again. Your cache administrator is webmaster. Generated Thu, 20 Oct 2016 15:56:46 GMT by s_wx1196 (squid/3.5.20)
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office Add-in Availability Office Add-ins Changelog Microsoft Graph API
Application-defined Or Object-defined Error Vb6
Office 365 Connectors Office 365 REST APIs SharePoint Add-ins Office UI Fabric Submit to
Application Defined Or Object Defined Error Excel Macro
the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Office VBA language reference Visual Basic language reference Error Messages Error Messages Application-defined application defined or object defined error vba formula or object-defined error Application-defined or object-defined error Application-defined or object-defined error #Else clause must be preceded by a matching #If #Else If, #Else, or #End If must be preceded by a matching #If #ElseIf http://answers.microsoft.com/en-us/msoffice/forum/msoffice_access-mso_winother/error-number-287/8d57a91d-82fd-47be-b922-4b49f67244d2 must be preceded by a matching #If or #ElseIf and followed by an #ElseIf, #Else, or #End If
FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated http://www.tek-tips.com/viewthread.cfm?qid=1748473 SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on http://www.pcreview.co.uk/threads/application-defined-or-object-defined-error-287.3994249/ members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode defined or HTML Markdown MediaWiki reStructuredText code below into your site. Visual Basic(Microsoft): Version 5 & 6 Forum at Tek-Tips HomeForumsProgrammersLanguagesVisual Basic(Microsoft): Version 5 & 6 Forum Sending email with Outlook 2010 - keeps giving run-time error 287 thread222-1748473 Forum Search FAQs Links MVPs Sending email with Outlook 2010 - keeps giving run-time error 287 Sending email with Outlook 2010 - keeps giving run-time error 287 AncientTiger (Programmer) (OP) 18 Apr defined or object 15 13:13 Ok, I'm at my wits end... this SHOULD be so simple, yet I've beat my head against a brick wall.... I'm trying to set up a function in my project to send emails using Microsoft Outlook 2010, and every code example I find fails. My specs: Windows 7 64bit Visual Basic 6 / Visual Studios 6 I have referenced the Microsoft Outlook 14.0 Object Library (msoutl.olb) Here's my function code CODEPublic Function SENDOUTLOOKEMAIL(ByVal OUTEMLIST As String, ByVal OUTSUBJ As String, ByVal OUTMSSG As String, ByVal OUTFILES As String) As Boolean Dim oApp As Outlook.Application Dim oEmail As Outlook.MailItem Set oApp = New Outlook.Application Set oEmail = oApp.CreateItem(olMailItem) With oEmail If BCCIT = True Then .BCC = OUTEMLIST Else .To = OUTEMLIST End If .Subject = OUTSUBJ .Body = OUTMSSG .Recipients.ResolveAll .SAVE On Error Resume Next .Send If Err <> 0 Then X = MsgBox("Error Occured: " + Err.Description) Err.Clear SENDOUTLOOKEMAIL = False Else X = MsgBox("Email Successfully Sent!!", vbInformation) SENDOUTLOOKEMAIL = True End If End With Set oEmail = Nothing oApp.Quit Set oApp = Nothing Exit Function It gets to .Recipients.ResolveAll, then gives a "Run-time error '287': Application-defined or object-defined error" I'm not sure what else to do :( Any help would be GREA
generate the error 287 at the objMail.Send. I think the path is wrong, but I don't know why. If I use "On Error Resume Next" above the Send, then there is no error popping up, but there is no email sent, either. Please show me how to fix it. Thank you. ------ strDocName = "frmStud" DoCmd.openfORM strDocName, acPreview, , "studId='" & glbStudId & "'" FileName = strDocName & ".pdf" DoCmd.OutputTo acOutputForm, strDocName, acFormatPDF, "C:\Temp\StudentForms\" & FileName, False ‘========================================== 'Using Outlook programming codes .... '========================================== Dim objOutlook As Object Dim objMail As Outlook.MailItem Set objOutlook = CreateObject("Outlook.application") Set objMail = objOutlook.CreateItem(olMailItem) objMail.To = "" objMail.Subject = "test sending a form" objMail.Attachments.Add "C:\Temp\StudentForms\" & FileName 'On Error Resume Next objMail.Send Set objOutlook = Nothing Tim, Apr 9, 2010 #1 Advertisements Daniel Pineault Guest Take a look at http://www.devhut.net/index.php?lang=en&pid=0000000013#OutlookAuto For a full Outlook automation function example which you can either simply use or use to fix your code with. -- Hope this helps, Daniel Pineault http://www.cardaconsultants.com/ For Access Tips and Examples: http://www.devhut.net Please rate this post using the vote buttons if it was helpful. "Tim" wrote: > My codes generate the error 287 at the objMail.Send. I think the path is > wrong, but I don't know why. If I use "On Error Resume Next" above the Send, > then there is no error popping up, but there is no email sent, either. Please > show me how to fix it. Thank you. > ------ > strDocName = "frmStud" > DoCmd.openfORM strDocName, acPreview, , "studId='" & glbStudId & "'" > FileName = strDocName & ".pdf" > DoCmd.OutputTo acOutputForm, strDocName, acFormatPDF, > "C:\Temp\StudentForms\" & FileName, False > ‘========================================== > 'Using Outlook programming codes .... > '========================================== > Dim objOutlook As Object > Dim objMail As Outlook.MailItem > > Set objOutlook = CreateObject("Outlook.application") > Set objMail = objOutlook.CreateItem(olMailItem) > > objMail.To = "" > objMail.Subject = "test sending a form" > > objMail.Attachments.Add "C:\Temp\Stud