# Mail merge unique excel attachments



## Philip041 (May 21, 2012)

Hi,

Not sure if this is valid in excel forum but here goes...

I have managed to split a big excel file by company name into a separate file for each company.

I want to do a mail merge, sending out a personalized email with the appropriate company file attached.

I can do the mail merge using word as it runs off my original big spreadsheet, however I don't know how to add a unique file. Each file is named after the company name which is the first column in my original file.

Hope this makes sense.

By the way, this is where I found the excellent file to do the splitting thing... http://www.rondebruin.nl/copy5.htm

Cheers in advance,

Philip


----------



## Macropod (May 21, 2012)

See: http://word.mvps.org/FAQs/MailMerge/MergeWithAttachments.htm


----------



## Philip041 (May 23, 2012)

Thanks!

I set it all up but I get this error:

Compile error:

User-defined type not defined

I found this, http://support.microsoft.com/kb/145759, but when I followed the instructions I couldn't find the Dao3032.dll file it references...

Any ideas?

Cheers!


----------



## Macropod (May 23, 2012)

Re "User-defined type not defined"
Did you pay attention to this part of the procedure:


> it is necessary to set a reference to the Microsoft Office Outlook Object Library


----------



## Philip041 (May 24, 2012)

ohhh, no, sorry, that was stupid of me, i thought you just had to have one of those ticked. have done so now!

Cheers


----------

