#1
|
|||
|
|||
Problem with Word Mail Merge VBA - Outlook Object Library not recognized
Hi everyone,
I am having a problem with the email merge macro Sub emailmergewithattachments() now that I've upgraded to Office 2013. I keep getting the Compile Error: User-Defined type not defined for the following line in the macro. Dim oOutlookApp As Outlook.Application Typically, for this macro to work one needs open the VB Editor and get it to recognize the Microsoft Outlook 15.0 Object Library by checking that box under Tools >> References and hitting OK. However, this does not do the trick for Word/Outlook 2013 apparently. This error persists even after the above mentioned box is checked. I'm hoping that someone can help me with this. That macro is super useful for what I am doing. Does anyone have any ideas what might be causing the problem? Thanks a lot! Shawn |
#2
|
||||
|
||||
Uncheck the Microsoft Outlook object library and change the code to late binding. In this case
Code:
Dim oOutlookApp As Object
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Thanks, Graham. I'll give it a shot. (Once I learn how late binding affects the code anyway ).
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Microsoft Excel 12.0 Object Library reference upload | chamdan | Project | 2 | 04-21-2014 06:30 AM |
Mail Merge using Word 2010 - Header source not be recognized | Gage262 | Word | 8 | 02-01-2012 11:08 AM |
Excel VBA: How to add a reference to Microsoft Word Object Library? | tinfanide | Excel Programming | 7 | 12-12-2011 05:21 AM |
Problem: object library invalid or contains references to object definitions | aligahk06 | Office | 0 | 08-19-2010 12:29 PM |
Access Object library 10 | Gyto | Office | 0 | 10-09-2008 09:04 AM |