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
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