Hello,
In Tools/References add MS Outlook 11.0 Object library. If error continues then try this declaration:
Dim objOutlook As Object Dim objItem As Object 'Create a Microsoft Outlook object. Set objOutlook = CreateObject("Outlook.Application") 'Create and open a new contact form for input. Set objItem = objOutlook.CreateItem(olContactItem)
happy coddin' (buddy*)lukas kyzlink
"SF" <ssamnang[ at ]yahoo.com> pí¹e v diskusním pøíspìvku news:eU4eoqFOGHA.3936[ at ]TK2MSFTNGP12.phx.gbl...
[Quoted Text] > Dim oApp As outlook.Application > Dim oMsg As outlook.MailItem > > Set oApp = New outlook.MailItem > Set oMsg = CreateItem(oMailItem) > > With oMsg > .To = "ssamnang[ at ]yahoo.com" > .Subject = "cmd Buttom Testing..." > .Body = "Hey delete me now" > .Send > End With > > > at the very first line, I got the following error: > > Compile Error: > User-Defined type not defined > > SF >
|