Hi Team,
I need to extract names of 2 attachement files in a mail but without extension, only the names
I tried this but i have this issue :
String.Join(", ", currentMailMessage.Attachments(0).Select(Function(x) x.Name))

Hi Team,
I need to extract names of 2 attachement files in a mail but without extension, only the names
I tried this but i have this issue :
String.Join(", ", currentMailMessage.Attachments(0).Select(Function(x) x.Name))

Hi @Soudios
Try this
String.Join(", ", currentMailMessage.Attachments.Select(Function(attachment) System.IO.Path.GetFileNameWithoutExtension(attachment.Name)).ToArray())
Regards,
attachment1Name = System.IO.Path.GetFileNameWithoutExtension(currentMailMessage.Attachments(0).Name)
attachment2Name = System.IO.Path.GetFileNameWithoutExtension(currentMailMessage.Attachments(1).Name)
Regards,
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.