Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

user defined type not defined

Status
Not open for further replies.

chochoo

Programmer
Aug 24, 2003
33
PK
hi to everyone!
i'm new comer to vb. i'm running win98 and vb6. and i want to send email via vb to any email containing the text values of the form as the text body of the email. the coding i'm using is ---

Dim oItem As Outlook.MailItem
Dim oitems As Items
Set oOutlook = New Outlook.Application

Set oitems = objInbox.Items

Set oItem = oOutlook.CreateItem(olMailItem)
'
With oItem

.To = "someone@yahoo.com"
.Body = tBody
.Subject = tSubject
.send

End With

now when i run the form and enter the values in the tbody text item and click on send button i got the error
"user defined type not defind". i'm using the code in the click event of the send button.
its just a simple form getting surveys of any user that is online and send the values to a fixed email. if anybody have any suggestion do tell me. it will be very kind of you.
 
Make sure your project has a reference to the Microsoft Outlook object library.
 
thanx for ur reply but how can i make sure of the reference?
 
If you are using VB6 as you stated then the reference won't be there by default.
Go to
Code:
PROJECT | REFERENCES
and check the box next to Microsoft Outlook 9.0 object library
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top