W
Wez.k
Hello Tim While brousing a thread I found the following code of yours for creating Emails in Vb:
Dim SubjectLine, Email_Content As String
Dim myOlApp As Outlook.Application
Dim myItem As MailItem
Set myOlApp = CreateObject("Outlook.Application")
SubjectLine = "The Subject of the email"
Email_Content = "Hello. Just a reminder that you owe me a phone call." & Chr(10) & "Call me today."
Set myItem = myOlApp.CreateItem(olMailItem)
myItem.Subject = SubjectLine
myItem.Body = Email_Content
myItem.To = "(e-mail address removed)"
myItem.Send
Set myOlApp = Nothing
Set myItem = Nothing
It wprks fine, but I also need to include a file as an attachment to the Email, could you tell me how to modify the code to do that please?
Many thanks
Wes.
Dim SubjectLine, Email_Content As String
Dim myOlApp As Outlook.Application
Dim myItem As MailItem
Set myOlApp = CreateObject("Outlook.Application")
SubjectLine = "The Subject of the email"
Email_Content = "Hello. Just a reminder that you owe me a phone call." & Chr(10) & "Call me today."
Set myItem = myOlApp.CreateItem(olMailItem)
myItem.Subject = SubjectLine
myItem.Body = Email_Content
myItem.To = "(e-mail address removed)"
myItem.Send
Set myOlApp = Nothing
Set myItem = Nothing
It wprks fine, but I also need to include a file as an attachment to the Email, could you tell me how to modify the code to do that please?
Many thanks
Wes.