Thread: Compile error..
View Single Post
  #1  
Old April 17th 10, 10:34 AM posted to microsoft.public.outlook.program_vba
Peter
external usenet poster
 
Posts: 120
Default Compile error..

Hi all,

i use this code in the "on click" event of a command button in a Access
form...

Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem

Set objOutlook = CreateObject
Set objEmail = objOutlook.CreateItem(olMailItem)

However..i receive:

Compile error:

User-defined type not defined

Does this imply that I need to add a module:?

Thanks!

Ads