Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Thread Tools Search this Thread
Old 01-08-2009
Join Date: May 2009
Posts: 37
Mail merge attachment

Hi friends,

I am using Outlook 2007 and i want to know how to add an attachment to a mail merge email from Word 2007, over here i need to send the same message to more then 50 people and at the same time i am having a pdf document attached to it. I am able to have mail merge but i am not able to attach those pdf file. Can anyone help me out with this issue.
Reply With Quote
Old 01-08-2009
Join Date: May 2008
Posts: 3,313
Mail merge attachment

As per my knowledge this is not possible with Word in that case you need to use VBA or can use Mail Merge Toolkit addin from MAPILab which adds this functionality because i was also facing same issue and at last i send the content to my friend and he wrote some code in VBA and was able to send it. Sorry i cannot provide you the code because i don't have it with me.
Reply With Quote
Old 01-08-2009
Join Date: Dec 2008
Posts: 101
Word Mail Merge with Attachment

Use the following code which is in VBA and you would be able to have Mail merge attachment

HTML Code:
Sub SetAttachment() 
Dim i As Long 
Dim Outlook_App As Outlook.Application 
Dim Item As Outlook.MailItem 
Dim Filepath As String, message As String, title As String 

message = "Enter the full path to the attachment."    ' Set prompt. 
title = " Email Attachment Path"    ' Set title. 

' Display message, title 
Filepath = InputBox(message, title) 

' iterate through all items in the Outlook Outbox 
Dim olNS As Outlook.NameSpace 
Dim MyFolder As Outlook.MAPIFolder 
Dim count As Integer 
' By following change eliminates the security access prompts! 
'Set olNS = oOutlook_App.GetNamespace("MAPI") 
Set olNS = ThisOutlookSession.GetNamespace("MAPI") 

Set MyFolder = olNS.GetDefaultFolder(olFolderOutbox) 
    For i = 1 To MyFolder.Items.count 
        Set Item = MyFolder.Items(i) 
        Item.Attachments.Add Trim(Filepath), olByValue, 1 
        count = count + 1 
    Next i 
    Set Item = Nothing 

MsgBox count & " files have been attached." 

'Clean up 
Set Outlook_App = Nothing 

End Sub
Reply With Quote

  TechArena Community > Software > Windows Software
Tags: , , , ,

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "Mail merge attachment"
Thread Thread Starter Forum Replies Last Post
Merge Mail with Windows live mail Mainstream Technology & Internet 5 08-11-2010 07:45 PM
Mail Attachment glitch Poks Portable Devices 4 01-10-2010 04:35 PM
Cannot open PDF attachment in Windows Mail Omar Windows Vista Mail 2 15-06-2010 11:10 PM
Mail merge from MS Word Jaishree Windows Software 2 08-07-2009 10:43 AM
Cannot open pps file from e-mail attachment ejohn Vista Help 6 03-12-2008 02:14 AM

All times are GMT +5.5. The time now is 10:19 AM.