A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook Email Merge with Attachment



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 23rd 07, 05:56 PM posted to microsoft.public.outlook.program_vba
Ann Campbell
external usenet poster
 
Posts: 3
Default Outlook Email Merge with Attachment

I am sending out five mass emailings to clients. I'm able to setup
the email merge and message in HTML format for the body of the email;
however, I need specific pdfs to attach to the mass mailing.

This is the code that I have so far and when it runs successfuly on
the email merge template (and any email window that is open); however,
when I click email merge as the final step, the emails go out without
attachments. I've tried to save the emails in the Outbox, open the
emails and run the macro there, but the files attach to only one
email.

Sub AttachPDF()
Dim objItem
On Error Resume Next
Set objItem = Application.ActiveInspector.CurrentItem
objItem.Attachments.Add "K:\filepath\filename1.pdf"
objItem.Attachments.Add "K:\filepath\filename2.pdf"
objItem.Attachments.Add "K:\filepath\filename3.pdf"
objItem.Attachments.Add "K:\filepath\filename4.pdf"
objItem.Attachments.Add "K:\filepath\filename5.pdf"
Set objItem = Nothing
End Sub

I know very little about macros and VB in Outlook, so your patience
and guidance is greatly appreciated!!

Thanks,
Ann

Ads
  #2  
Old February 26th 07, 07:08 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Outlook Email Merge with Attachment



Ann, probably you have to call objItem.Save in the end.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?...4&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am 23 Feb 2007 08:56:12 -0800 schrieb Ann Campbell:

I am sending out five mass emailings to clients. I'm able to setup
the email merge and message in HTML format for the body of the email;
however, I need specific pdfs to attach to the mass mailing.

This is the code that I have so far and when it runs successfuly on
the email merge template (and any email window that is open); however,
when I click email merge as the final step, the emails go out without
attachments. I've tried to save the emails in the Outbox, open the
emails and run the macro there, but the files attach to only one
email.

Sub AttachPDF()
Dim objItem
On Error Resume Next
Set objItem = Application.ActiveInspector.CurrentItem
objItem.Attachments.Add "K:\filepath\filename1.pdf"
objItem.Attachments.Add "K:\filepath\filename2.pdf"
objItem.Attachments.Add "K:\filepath\filename3.pdf"
objItem.Attachments.Add "K:\filepath\filename4.pdf"
objItem.Attachments.Add "K:\filepath\filename5.pdf"
Set objItem = Nothing
End Sub

I know very little about macros and VB in Outlook, so your patience
and guidance is greatly appreciated!!

Thanks,
Ann

  #3  
Old February 26th 07, 10:15 PM posted to microsoft.public.outlook.program_vba
Ann Campbell
external usenet poster
 
Posts: 3
Default Outlook Email Merge with Attachment

On Feb 26, 1:08 am, "Michael Bauer [MVP - Outlook]"
wrote:
Ann, probably you have to call objItem.Save in the end.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?...4&languageid=1
(German:http://www.VBOffice.net/product.html?pub=6)

Am 23 Feb 2007 08:56:12 -0800 schrieb Ann Campbell:

I am sending out five mass emailings to clients. I'm able to setup
the email merge and message in HTML format for the body of the email;
however, I need specific pdfs to attach to the mass mailing.


This is the code that I have so far and when it runs successfuly on
the email merge template (and any email window that is open); however,
when I click email merge as the final step, the emails go out without
attachments. I've tried to save the emails in the Outbox, open the
emails and run the macro there, but the files attach to only one
email.


Sub AttachPDF()
Dim objItem
On Error Resume Next
Set objItem = Application.ActiveInspector.CurrentItem
objItem.Attachments.Add "K:\filepath\filename1.pdf"
objItem.Attachments.Add "K:\filepath\filename2.pdf"
objItem.Attachments.Add "K:\filepath\filename3.pdf"
objItem.Attachments.Add "K:\filepath\filename4.pdf"
objItem.Attachments.Add "K:\filepath\filename5.pdf"
Set objItem = Nothing
End Sub


I know very little about macros and VB in Outlook, so your patience
and guidance is greatly appreciated!!


Thanks,
Ann


I changed Nothing to Save and ran the macro on the email merge. The
files attached to the merge template email; however, when the merge
completed, the sent emails did not have the attached files.

  #4  
Old February 27th 07, 07:27 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Outlook Email Merge with Attachment



Please show what you've changed exactly.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?...4&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am 26 Feb 2007 13:15:28 -0800 schrieb Ann Campbell:

On Feb 26, 1:08 am, "Michael Bauer [MVP - Outlook]"
wrote:
Ann, probably you have to call objItem.Save in the end.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?...4&languageid=1
(German:http://www.VBOffice.net/product.html?pub=6)

Am 23 Feb 2007 08:56:12 -0800 schrieb Ann Campbell:

I am sending out five mass emailings to clients. I'm able to setup
the email merge and message in HTML format for the body of the email;
however, I need specific pdfs to attach to the mass mailing.


This is the code that I have so far and when it runs successfuly on
the email merge template (and any email window that is open); however,
when I click email merge as the final step, the emails go out without
attachments. I've tried to save the emails in the Outbox, open the
emails and run the macro there, but the files attach to only one
email.


Sub AttachPDF()
Dim objItem
On Error Resume Next
Set objItem = Application.ActiveInspector.CurrentItem
objItem.Attachments.Add "K:\filepath\filename1.pdf"
objItem.Attachments.Add "K:\filepath\filename2.pdf"
objItem.Attachments.Add "K:\filepath\filename3.pdf"
objItem.Attachments.Add "K:\filepath\filename4.pdf"
objItem.Attachments.Add "K:\filepath\filename5.pdf"
Set objItem = Nothing
End Sub


I know very little about macros and VB in Outlook, so your patience
and guidance is greatly appreciated!!


Thanks,
Ann


I changed Nothing to Save and ran the macro on the email merge. The
files attached to the merge template email; however, when the merge
completed, the sent emails did not have the attached files.

  #5  
Old February 27th 07, 04:14 PM posted to microsoft.public.outlook.program_vba
Ann Campbell
external usenet poster
 
Posts: 3
Default Outlook Email Merge with Attachment

On Feb 27, 1:27 am, "Michael Bauer [MVP - Outlook]"
wrote:
Please show what you've changed exactly.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?...4&languageid=1
(German:http://www.VBOffice.net/product.html?pub=6)

Am 26 Feb 2007 13:15:28 -0800 schrieb Ann Campbell:

On Feb 26, 1:08 am, "Michael Bauer [MVP - Outlook]"
wrote:
Ann, probably you have to call objItem.Save in the end.


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?...4&languageid=1
(German:http://www.VBOffice.net/product.html?pub=6)


Am 23 Feb 2007 08:56:12 -0800 schrieb Ann Campbell:


I am sending out five mass emailings to clients. I'm able to setup
the email merge and message in HTML format for the body of the email;
however, I need specific pdfs to attach to the mass mailing.


This is the code that I have so far and when it runs successfuly on
the email merge template (and any email window that is open); however,
when I click email merge as the final step, the emails go out without
attachments. I've tried to save the emails in the Outbox, open the
emails and run the macro there, but the files attach to only one
email.


Sub AttachPDF()
Dim objItem
On Error Resume Next
Set objItem = Application.ActiveInspector.CurrentItem
objItem.Attachments.Add "K:\filepath\filename1.pdf"
objItem.Attachments.Add "K:\filepath\filename2.pdf"
objItem.Attachments.Add "K:\filepath\filename3.pdf"
objItem.Attachments.Add "K:\filepath\filename4.pdf"
objItem.Attachments.Add "K:\filepath\filename5.pdf"
Set objItem = Nothing
End Sub


I know very little about macros and VB in Outlook, so your patience
and guidance is greatly appreciated!!


Thanks,
Ann


I changed Nothing to Save and ran the macro on the email merge. The
files attached to the merge template email; however, when the merge
completed, the sent emails did not have the attached files.


Sub AttachPDF()
Dim objItem
On Error Resume Next
Set objItem = Application.ActiveInspector.CurrentItem
objItem.Attachments.Add "K:\filepath\filename1.pdf"
objItem.Attachments.Add "K:\filepath\filename2.pdf"
objItem.Attachments.Add "K:\filepath\filename3.pdf"
objItem.Attachments.Add "K:\filepath\filename4.pdf"
objItem.Attachments.Add "K:\filepath\filename5.pdf"
Set objItem = Save
End Sub

  #6  
Old February 28th 07, 07:08 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Outlook Email Merge with Attachment



Ok, I thought that :-) As mentioned, please write:
objItem.Save.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?...4&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am 27 Feb 2007 07:14:33 -0800 schrieb Ann Campbell:

On Feb 27, 1:27 am, "Michael Bauer [MVP - Outlook]"
wrote:
Please show what you've changed exactly.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?...4&languageid=1
(German:http://www.VBOffice.net/product.html?pub=6)

Am 26 Feb 2007 13:15:28 -0800 schrieb Ann Campbell:

On Feb 26, 1:08 am, "Michael Bauer [MVP - Outlook]"
wrote:
Ann, probably you have to call objItem.Save in the end.


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Keep your Outlook categories organized!
http://www.shareit.com/product.html?...4&languageid=1
(German:http://www.VBOffice.net/product.html?pub=6)


Am 23 Feb 2007 08:56:12 -0800 schrieb Ann Campbell:


I am sending out five mass emailings to clients. I'm able to setup
the email merge and message in HTML format for the body of the email;
however, I need specific pdfs to attach to the mass mailing.


This is the code that I have so far and when it runs successfuly on
the email merge template (and any email window that is open); however,
when I click email merge as the final step, the emails go out without
attachments. I've tried to save the emails in the Outbox, open the
emails and run the macro there, but the files attach to only one
email.


Sub AttachPDF()
Dim objItem
On Error Resume Next
Set objItem = Application.ActiveInspector.CurrentItem
objItem.Attachments.Add "K:\filepath\filename1.pdf"
objItem.Attachments.Add "K:\filepath\filename2.pdf"
objItem.Attachments.Add "K:\filepath\filename3.pdf"
objItem.Attachments.Add "K:\filepath\filename4.pdf"
objItem.Attachments.Add "K:\filepath\filename5.pdf"
Set objItem = Nothing
End Sub


I know very little about macros and VB in Outlook, so your patience
and guidance is greatly appreciated!!


Thanks,
Ann


I changed Nothing to Save and ran the macro on the email merge. The
files attached to the merge template email; however, when the merge
completed, the sent emails did not have the attached files.


Sub AttachPDF()
Dim objItem
On Error Resume Next
Set objItem = Application.ActiveInspector.CurrentItem
objItem.Attachments.Add "K:\filepath\filename1.pdf"
objItem.Attachments.Add "K:\filepath\filename2.pdf"
objItem.Attachments.Add "K:\filepath\filename3.pdf"
objItem.Attachments.Add "K:\filepath\filename4.pdf"
objItem.Attachments.Add "K:\filepath\filename5.pdf"
Set objItem = Save
End Sub

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
email merge Martin Outlook - Using Contacts 2 December 5th 06 09:58 PM
eMail Mail Merge using Outlook 2002 Beth1976 Outlook - Using Contacts 1 September 22nd 06 01:34 PM
Problem With Word Finding Outlook Contact Lists For Email Merge [email protected] Outlook - General Queries 11 September 21st 06 12:19 AM
email merge with attachment Michel Fabing Outlook - General Queries 3 August 7th 06 05:59 PM
Outlook 2003 removes hyperlinks during mail merge to email Spike9458 Outlook - General Queries 3 June 23rd 06 02:44 PM


All times are GMT +1. The time now is 08:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.