Link to home
Create AccountLog in
Avatar of A G
A GFlag 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.
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

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
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?
Avatar of 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.
Avatar of 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,
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.
Avatar of 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
"
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.
Avatar of 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
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of 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?
Avatar of 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
Oops, forgot about this question - sorry.
Replace olMailItem by olMail in line 10.