| | |
Send Outlook email thru VB
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2007
Posts: 113
Reputation:
Solved Threads: 0
Hello everyone,
I have an exce spreadsheet called "ProjectStatus.xls" in my local folder "C:\ProjectStatus.xls".
I need to send it as an attachment to someone and I am using these codes:
what is the correct code syntax to accomplish the objective?
Thanks.
tgifgemini
I have an exce spreadsheet called "ProjectStatus.xls" in my local folder "C:\ProjectStatus.xls".
I need to send it as an attachment to someone and I am using these codes:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Set OutlookApp = CreateObject("Outlook.Application") Set OutlookMail = OutlookApp.CreateItem(Outlookmailitem) OutlookMail.To = "giftxtian@yahoo.com" OutlookMail.Subject = "Project Status" OutlookMail.Body = "This is VB email test" If Len(MailAttach) = 0 Then OutlookMail.Attachments.Add "C:\ProjectStatus.xls" End If OutlookMail.Display 'To display the email OutlookMail.Send 'To send the email Set OutlookApp = Nothing Set OutlookMail = Nothing
what is the correct code syntax to accomplish the objective?
Thanks.
tgifgemini
Are you using vb.net?
A conclusion is the place where you got tired of thinking. http://www.martin2k.co.uk/forums/index.php?showforum=4
http://www.a1vbcode.com/a1vbcode/vbforums/Forum3-1.aspx
http://www.developerfusion.co.uk/for...orum&ForumID=4
![]() |
Similar Threads
- VB6 - Outlook Email set up - Error 424: Object required (Visual Basic 4 / 5 / 6)
- How do i Send and Receive Email with Attachment (Visual Basic 4 / 5 / 6)
- Outlook 2000 will send but emails are never received (Windows Software)
- MS Outlook '03 and Email Server (Windows Software)
- outlook 03 email address read as word; duplicate email (Windows Software)
- Outlook for eMail, confusing, (Windows Software)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: VB6/Excel - Using Char(10) to fit a long rcrdset as two lines within same recordset
- Next Thread: apply searching in VB 6.0
Views: 5764 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
6 429 2007 access activex add age append application basic beginner birth c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





