Also check this,
If(currentOffice365Message.Attachments.Any(Function(x) System.Text.RegularExpressions.Regex.IsMatch(x.Name, “.pdf$”, RegexOptions.IgnoreCase)), “.pdf”, “.xls”)
Also check this,
If(currentOffice365Message.Attachments.Any(Function(x) System.Text.RegularExpressions.Regex.IsMatch(x.Name, “.pdf$”, RegexOptions.IgnoreCase)), “.pdf”, “.xls”)