Just wanted to share my solution to the problem. I was getting the same "Compile Error: User-defined type not defined" when it his this part of my script:
Dim OutlookApp As Outlook.Application
The problem was that I did not have the correct reference for Outlook. However, when I looked through the reference list, I did not see anything for Outlook.
I happened to read an article on the Microsoft support site that said "If the Microsoftw Outlook Object Library is not listed under Available Referenced, click "Browse" to locate the MSOUTL.OLB file. It is located by default in the C:\program files (x86)\Microsoft Office\Office folder.
I was able to locate the above file and voila, a reference was created to the "Microsoft Outlook 12.0 Object Library" that was not their before.
Completely solved my "User-defined type not defined" error!!!
Hope this helps!