Attachment throwing error

Am trying to get email attachment name with formula attachment= Ctype(mailmessage.attachments.FirstorDefault, attachment).Name
But it’s throwing error like attachment is ambiguous imported from namespaces or types,
Please help to sort this out

Hi @dpaktr

Try like this

 New System.Net.Mail.Attachment(Ctype(mailmessage.attachments.FirstorDefault, attachment).Name)

Checkout this thread


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.