PC Review


Reply
Thread Tools Rate Thread

Add attachments in outlook xp, with macro

 
 
=?Utf-8?B?TWF1cmljaW8=?=
Guest
Posts: n/a
 
      23rd Aug 2005
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      23rd Aug 2005
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

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Try Picture Attachments Wizard for Outlook! http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"Mauricio" wrote:

> 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

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      23rd Aug 2005
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
http://www.outlookcode.com/jumpstart.aspx


"Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in message news:4316E961-3BDD-4AB2-9AAE-(E-Mail Removed)...
>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
>
> --
> Eric Legault - B.A, MCP, MCSD, Outlook MVP
> Try Picture Attachments Wizard for Outlook! http://tinyurl.com/ckytm
> Job: http://www.imaginets.com
> Blog: http://blogs.officezealot.com/legault/
>
>
> "Mauricio" wrote:
>
>> 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

 
Reply With Quote
 
=?Utf-8?B?TWF1cmljaW8=?=
Guest
Posts: n/a
 
      24th Aug 2005
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

"Eric Legault [MVP - Outlook]" wrote:

> 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
>
> --
> Eric Legault - B.A, MCP, MCSD, Outlook MVP
> Try Picture Attachments Wizard for Outlook! http://tinyurl.com/ckytm
> Job: http://www.imaginets.com
> Blog: http://blogs.officezealot.com/legault/

 
Reply With Quote
 
=?Utf-8?B?TWF1cmljaW8=?=
Guest
Posts: n/a
 
      24th Aug 2005
thanks Sue, precisely that is what ยก've got in mind, thanks for the point

"Sue Mosher [MVP-Outlook]" wrote:

> 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
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "Eric Legault [MVP - Outlook]" <(E-Mail Removed)> wrote in message news:4316E961-3BDD-4AB2-9AAE-(E-Mail Removed)...
> >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
> >
> > --
> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
> > Try Picture Attachments Wizard for Outlook! http://tinyurl.com/ckytm
> > Job: http://www.imaginets.com
> > Blog: http://blogs.officezealot.com/legault/
> >
> >
> > "Mauricio" wrote:
> >
> >> 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

>

 
Reply With Quote
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      24th Aug 2005
If you use the macro I provided on the messages in your Outbox, you can amend
it by including objItem.Send. That should cause the message to not get
excluded in the next Send/Receive cycle.

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Try Picture Attachments Wizard for Outlook! http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


"Mauricio" wrote:

> 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
>
> "Eric Legault [MVP - Outlook]" wrote:
>
> > 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
> >
> > --
> > Eric Legault - B.A, MCP, MCSD, Outlook MVP
> > Try Picture Attachments Wizard for Outlook! http://tinyurl.com/ckytm
> > Job: http://www.imaginets.com
> > Blog: http://blogs.officezealot.com/legault/

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to store outlook email attachments to hd folders with sender names andie6931 Windows XP 0 18th Dec 2009 05:06 AM
Printing Outlook Emails with List of Attachments by Copy Macro Bert Microsoft Outlook VBA Programming 1 21st May 2007 06:21 AM
vba macro to print email and attachments outlook 2000 Dan over in IT Microsoft Outlook VBA Programming 2 7th Jun 2006 08:08 PM
Macro to open attachments in Outlook jasbury@ieee.org Microsoft Outlook Interoperability 0 10th Jan 2006 03:04 PM
creating macro in MS outlook that will place attachments into a shared folder Patriot Microsoft VB .NET 1 14th Nov 2003 12:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:27 PM.