i am using the following code to generate an email from my form by clicking a button
What i need it this
the txtSearchBAM value will determine what pictures to send
but that value has anywhere from 1 to 15 pictures...
All pictures are located at this address
The next folder is the BAM number and then that folder contains the pictures...
how can i make this code send to how many ever pictures are in the specified folder?
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment
Dim TheAddress As String
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
Set objOutlookRecip = objOutlookMsg.Recipients.Add(Me![txtSendemail])
objOutlookRecip.Type = olTo
.Subject = Me.txtMake.Value & "Pictures From Baker Abilene Machine" ' can be a text box on form
.Body = "Sending many photos" ' can be a text box on form
Set objOutlookAttach = .Attachments.Add("C:\Users\Addie\Desktop\Droid\Database\" & (Me.txtSearchBAM.Value) & "\1.jpg")
Set objOutlookAttach = .Attachments.Add("C:\Users\Addie\Desktop\Droid\Database\" & (Me.txtSearchBAM.Value) & "\2.jpg")
' repeat for images
Set objOutlookMsg = Nothing
Set objOutlook = Nothing