Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    Alpine Califormia
    Posts
    1,789

    Unanswered: Email through Access xp

    I keep getting an error message when I execute this though a command button anyone see anything wrong with it???



    Private Sub Command165_Click()
    On Error GoTo Err_Command165_Click
    Dim objOL As Object
    Set objOL = CreateObject("Outlook.Application")
    Set ol = New Outlook.Application


    Dim appOutlook As New Outlook.Application
    Dim omItem As MailItem
    Dim ReqId As String

    ReqId = Me.txt.Value
    Set omItem = appOutlook.CreateItem(olMailItem)

    omItem.To = "email_address"
    omItem.DeleteAfterSubmit = True
    omItem.Subject = "Your subject"
    omItem.Body = "Your email body"
    omItem.Send

    Exit_Command165_Click:
    Exit Sub

    Err_Command165_Click:
    MsgBox Err.Description
    Resume Exit_Command165_Click

    End Sub

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    What error message?

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •