I am trying to send an e-mails through VB without having to receive a warning message about virus'. Here is my code:
Dim oitem As Outlook.MailItem
Dim oitems As Items
Dim oOutlook, objInbox As Object
Dim tTo, tBody, tSubject, tAttachment As String
tTo = "will.sher@someplace.com"
tBody = "This is just a test"
tSubject = "My test"
tAttachment = "c:\garbage.doc"
Set oOutlook = New Outlook.Application
'Set oitems = objInbox.Items
Set oitem = oOutlook.CreateItem(olMailItem)
With oitem
.To = tTo
.Body = tBody
.Subject = tSubject
.Attachments.Add tAttachment
.Send
End With
I can't seem to find any information that will handle this, but I know it exists. Can this be done without having to change my code around too much?
Dim oitem As Outlook.MailItem
Dim oitems As Items
Dim oOutlook, objInbox As Object
Dim tTo, tBody, tSubject, tAttachment As String
tTo = "will.sher@someplace.com"
tBody = "This is just a test"
tSubject = "My test"
tAttachment = "c:\garbage.doc"
Set oOutlook = New Outlook.Application
'Set oitems = objInbox.Items
Set oitem = oOutlook.CreateItem(olMailItem)
With oitem
.To = tTo
.Body = tBody
.Subject = tSubject
.Attachments.Add tAttachment
.Send
End With
I can't seem to find any information that will handle this, but I know it exists. Can this be done without having to change my code around too much?