Avatar of A G
A G
Flag for United States of America asked on

Sending Multiple Emails to Same user With Different Attachments through Outlook

I send about thirty emails which has distinct attachments to the same emails. I am right clicking each file and using "Send To". I need to type the email dresses each time. Is there a queuing function in MS Outlook? Or, is there a VBA code I can use to achieve the same thing.
Summary
1. 30 Distinct Files
2. Will be sent to the same emails.
3. There needs to be 30 separate emails.
OutlookExchangeMicrosoft ApplicationsVBA

Avatar of undefined
Last Comment
Qlemo

8/22/2022 - Mon
Dan Craciun

There will be someone soon here with a VBA solution.

If you want something a bit different, try AutoIT. It's designed to solve exactly the type of repetitive tasks that you posted.

Note: you'll need a basic understanding of programming constructs to be able to code in AutoIT. Or you could use AU3 Recorder :)

HTH,
Dan
Qlemo

Are you doing that same action regularly?
  Are the email addresses the same?
  Are that 30 file names the same each time?
Can't you use a group for the addresses?
A G

ASKER
1. Yes, I do this daily.
2 & 4 Email addresses are the same and I am using groups.
3. File names are different and they should be the subject of every email.

The trouble I am having is

I Need to right click --> Send to ---> put the email address group name --> Remove Emailing: from the subject line --> Click send.

I am wondering if there is a way to automate this easily so I wont have to go  and do this 30 times a day. It just takes couple minutes but it'll be much easier if everything  is done automatically.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
A G

ASKER
Thanks Dan,

I know how to program on VBA. Last time I did it for Outlook was years ago and there were lots of security features which basically made it difficult to write code MS Outlook to send emails.

:) I know Autoit as well and I was hoping I could avoid it. It has been years since I last used it but I'll check it again. Thanks,
Qlemo

Before I start assembling something in VBA, how about you creating a single mail with all attachments, and then run VBA code on that to get your mails as requested? VBA could be triggered with a button in the Quick Access bar of the email form window.
A G

ASKER
Qlemo, I apologize if I misunderstood you. Here is the code that is seen when I open the VBA editor. I dont belive this is the one you are looking for.

"Private Sub Application_Reminder(ByVal Item As Object)
  Dim objMsg As MailItem
  Set objMsg = Application.CreateItem(olMailItem)
 
 
If Item.MessageClass <> "IPM.Appointment" Then
  Exit Sub
End If
 
If Item.Categories <> "Send Message" Then
  Exit Sub
End If
 
 
  objMsg.To = Item.Location
  objMsg.Subject = Item.Subject
  objMsg.Body = Item.Body
  objMsg.Send
 
 
  Set objMsg = Nothing
End Sub
"
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Qlemo

I was talking about the way how to start the real stuff code. Manually create a new mail. Drag all files on the it. Press a button starting the code we have to write up.
A G

ASKER
Ok, I did open a new mail ----> Drag the files ----> I opened the VBA editor.

Sorry if I am still not following you.
ASKER CERTIFIED SOLUTION
Qlemo

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
A G

ASKER
Thanks, I think this is exactly what I am looking for but it doesnt work for some reason. I open a mail window with the attachments and hit the macro button and nothing happens. What might be the reason?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
A G

ASKER
Ok sorry, Macros were disabled. It gives a runtime error 438 - object doesn't support this property or method. It highlights attachments.add att  line
Qlemo

Oops, forgot about this question - sorry.
Replace olMailItem by olMail in line 10.