Hi everyone,
I have included a "Send mail" module in my vb module, but I want to accept the email address from an input box instead of hard-coding the recipients email address because the recipient may be different each given time.
Below is my code:
SENDEMAIL:
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookMail = OutlookApp.CreateItem(0)
OutlookMail.To = "giftxtian@yahoo.com"
OutlookMail.Subject = "Project Status"
OutlookMail.Body = "This is VB email test"
If Len(MailAttach) = 0 Then
OutlookMail.Attachments.Add MailAttach '"C:\ProjectStatus.xls"
End If
OutlookMail.Display 'To display the email
OutlookMail.Send 'To send the email
How can I imbed the input box in the above routine?
Thanks.
GiftX