Originally posted by ttamilvanan81
1. Go to the VBA Editor
2. Go to Tools - Referances - click Browse
3. Locate the activeX file (comdlg32.ocx)
Private Sub Form_Load()
Set OLApp = CreateObject("Outlook.Application")
Set MyItem = OLApp.CreateItem(olMailItem)
txtInsertFile.Text = "c:\ReadMe.txt"
MyItem.To = "xxx@gmail.com"
MyItem.Subject = "Attach file"
MyItem.Body = "read this file "
Set MyAttachments = MyItem.Attachments
MyAttachments.Add txtInsertFile.Text
MyItem.Send
End Sub
Comment