Results 1 to 2 of 2
  1. #1
    josros60 is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    1

    attach more than one file

    how to modify the code below to send more than one on eamil using outlook,


    send code:

    Private Sub btnSend_Click()


    Dim oApp As New Outlook.Application
    Dim oEmail As Outlook.MailItem

    Set oEmail = oApp.CreateItem(olMailItem)

    oEmail.To = Me.txtTo
    oEmail.Subject = Me.txtSubject
    oEmail.Body = Me.txtBody
    If Len(Me.txtAttachment) > 0 Then
    oEmail.Attachments.Add Me.txtAttachment.Value

    End If
    With oEmail
    ' If Not IsNull(.To) And Not IsNull(.Subject) And Not IsNull(.Body) Then
    .Display
    MsgBox "Email Sent!"
    ' Else
    ' MsgBox "Please fill out the required fields."
    'End If
    End With

    oEmail

    End Sub


    Code:
    End Sub

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    oEmail.Attachments.Add "c:\folder\file.txt"
    oEmail.Attachments.Add txtBox1
    oEmail.Attachments.Add txtBox2

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 06-25-2015, 07:05 AM
  2. Replies: 5
    Last Post: 04-27-2015, 12:26 PM
  3. How to attach PDF file to an Access database
    By Ayiramala in forum Access
    Replies: 4
    Last Post: 01-09-2015, 11:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums