View Single Post
 
Old 02-01-2013, 02:27 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Without seeing your code, which you've still not provided, I can't tell you how/where to add it to that. Here's a generic demonstration. The code assumes you're using early binding:
Code:
Sub Demo()
Dim objOutlook As Outlook.Application
Dim objNameSpace As Outlook.NameSpace
Dim objMailItem As Outlook.MailItem
Dim objRecipient As Outlook.Recipient
Set objOutlook = New Outlook.Application
Set objNameSpace = objOutlook.GetNamespace("MAPI")
Set objMailItem = objOutlook.CreateItem(olMailItem)
With objRecipient
  .Add ("John Wilson")
  .Type = olTo
  .Add ("Adrian Fearnley")
  .Type = olTo
  .Add ("Chuck Feathers")
  .Type = olcc
End With
With objMailItem
  .Subject = "Financial Analysis"
  .Body = "Hi John, Adrian & Chuck," & vbCr & "I hope all's well. Here's the financial analysis." & _
      vbCr & vbCr & "Regards" & Environ("UserName")
  .Attachments.Add ("C:\Users" & Environ("UserName") & "\Documents\Financials.xls")
  .Logon , , True
  .Send
End With
Set objMailItem = Nothing: Set objNameSpace = Nothing: Set objOutlook = Nothing
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote