excel 2010 vba add attachment to email

BADANDY

New Member
Joined
Apr 8, 2009
Messages
9
good day, i have recently upgraded (lol) to office 2010. i have several vb projects i did in office 2007. and i am coming up with a pile of errors the current one i can not figure out is below here is a snipit of my code



Set oApp = CreateObject("Outlook.Application")
Set oMail = oApp.CreateItem(0)
With oMail
'send to person or group
'.To = "bfrancisco@occimofab.com; davidw@occimofab.com"
'subject of email
.Subject = "For Review And Modification " & ActiveWorkbook.Name & " "
.Attachments.Add oWB.FullName
.Display
End With

when i get to the .attachment.add i get an error that states

Run-time error
you dont have appropriat permission to perform this operation.

this worked with 2003 and 2007.

any help would be appreciated
thanks
andy
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,224,525
Messages
6,179,314
Members
452,905
Latest member
deadwings

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