•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 391,563 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,705 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 3259 | Replies: 5
![]() |
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:
How can I imbed the input box in the above routine?
Thanks.
GiftX
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 emailHow can I imbed the input box in the above routine?
Thanks.
GiftX
Hi tgif,
In Command Click, before u call the above module use InputBox say,
Regards
Veena
In Command Click, before u call the above module use InputBox say,
Public EMailID as String
EMailID = InputBox("Enter EMail ID")
If Trim(EMailID) <> "" Then
'Call The Send Function
End If
and change this to:
OutlookMail.To = EMailIDRegards
Veena
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Visual Basic 4 / 5 / 6 Marketplace
- VB6 - Look up email address from outlook address book? (Visual Basic 4 / 5 / 6)
- Res. Form/Dreamweaver 8/Email to Address (HTML and CSS)
- username=email address inputted on submission>is this possible (PHP)
- JavaScript -- Validating an email address (JavaScript / DHTML / AJAX)
- outlook 03 email address read as word; duplicate email (Windows Software)
- Protecting email address from robots (PHP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: String in VB 6.0
- Next Thread: VB6 help


Linear Mode