Attach Sheet and Send Mail VBA

GK039

Board Regular
Joined
Oct 29, 2010
Messages
225
Office Version
  1. 365
Platform
  1. Windows
Hi all,

There is an older thread about emailing attachments through vba but i cant get through.

The code is working perfectly but when its get to this point

<code>

Set MItem = OutlookApp.CreateItem(olMailItem) 'Create Mail Item
With MItem
.To = EmailAddr
.Subject = Subj
.Body = msg
.Attachments.Add....... (red dots to indicate the problem)
.Send
End With


the email is sent without the attachment. I've tried to pass a string argument, something like

.Attachments.Add StrPathName

OR to hard code the path, something like

.Attachment.Add ("H:\metro\[Appraisal File General Managers.xls]Report3") but again the mail is sent without the attachment

Any help is appreciated

Thanks

George
</code>
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top