first this massage
a program throwing outomaticall email do u want to allow it yes or no
occuring
on clicking no error occuring application defined or object defined error
on clicking yes error occuring outlook does not recnoze one or more name
on this code
and object does not this property of meathod error here
VB Code:
.Attachment = "c:\path\file.txt" ' attach any files here
three error occuring i m using ur last post this one
VB Code:
Private Sub cmdSendMail_Click()
Dim objOutlook As Outlook.Application
Dim objMailItem As Outlook.MailItem
Set objOutlook = New Outlook.Application
Set objMailItem = objOutlook.CreateItem(olMailItem)
With objMailItem
.To = "ToAddress" 'recipient's address
.Subject = "subject" 'subject box content
.Body = "email message" ' message goes here
.Attachment = "c:\path\file.txt" ' attach any files here
.Send
End With
Set objMailItem = Nothing
Set objOutlook = Nothing
End Sub