.attachments.add

nirmalachr

New Member
Joined
Nov 25, 2013
Messages
26
Hi,

I have created a command button to communicate the status by sending outlook email with attachment and the attachment will be added by the user, some times attachment may not be necessary.

When i tried with the following code it throwing an exception Path not found.

eattach = UserForm3.Label11.Caption
Set app = Nothing
Set itm = Nothing
Set app = CreateObject("outlook.Application")
Set itm = app.createitem(0)
With itm
.Subject = esubject
.To = sendto
'.cc = CCto
.body = ebody
'.attachments.Add eattach
'If Not IsMissing(AttachmentPath) Then
'Set objOutlookAttach = .attachments.Add(AttachmentPath) after adding this also exception is comming
'End If


Please help me how to skip .attachment.add is empty/null

Thanks in advance
 

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,214,790
Messages
6,121,608
Members
449,038
Latest member
apwr

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