one_more_cave_dweller
Board Regular
- Joined
- Sep 27, 2004
- Messages
- 118
Is there a way to have a macro send an email without having to open Outlook?
Thanks
ray:
Thanks
Dim olMailItem As Variant
Set out = CreateObject("Outlook.Application")
With out.CreateItem(olMailItem)
'strEmail = "name@domain.com" 'copy and uncomment these two
'.Recipients.Add strEmail 'lines to add more recipients
strEmail = "taz@jdomain.net" 'Sets the recipient string
.Recipients.Add strEmail 'Adds that recipient to the list
.Subject = "New"
.Body = "<\\FILEV02\!GENERAL3\!IT\Logs\" & ActiveWorkbook.Name & ">"
' link to the file; will need to be changed if folder moves or naming scheme changes
' If the path and or filename has spaces, you must enclose the entire path/filename in angle brackets (<>)
.Send
End With
one_more_cave_dweller said:Is there a way to have a macro send an email without having to open Outlook?
Thanksray:
thanks Smitt, I would appreciate thatpennysaver said:HA!
Actually, I can send you some code that I adapted from NateO's original masterpiece, but Nate's is still the best.
Smitty
(Heya fellas!)