Add attachments in outlook xp, with macro

G

Guest

The thing is this; i've have a lot of e-mails in the outbox folder results of
a mail merge between and excel database and a word main document but i need
to attach a file to this e-mails, and the mail merge procedure don't allow me
to do it, the only thing that i've found taht works is to stop the atuo send
uin outlook and add the attach mail by mail, but it's a bit laaaggg, don't
you think? ... now, the thing is how with a macro can a add to all the
e-mails in the outbox folder the same file in attachment, it's a zip file
with 3 or 4 pdf files inside. thanks in advance for the help
 
G

Guest

A little birdie is trying to remind me that there's something wrong about
editing e-mails in the Outbox, but I can't remember what it is.

This macro will attach a predefined file (change the argument to the Add
method for your particular file) to all messages you currently have selected:

Sub AddAttachmentToSelectedMessages()
Dim objItem As Object
If ActiveExplorer.Selection.Count = 0 Then Exit Sub

For Each objItem In ActiveExplorer.Selection
objItem.Attachments.Add ("C:\Temp\test.txt")
objItem.Save
Next
End Sub
 
S

Sue Mosher [MVP-Outlook]

If you edit a message in the Outbox, you have to invoke Send again or it won't be delivered to the upstream server.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

thanks Eric, perhaps the comment that sue mosher post below you is the thing
that you cant remember, but there is no problem for the account not receive
e-mails and don't send them until i press the send/receive button. So
whenmodifying the e-mails the only thing i've have to do is press the send
button and is done, thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top