FA5Icon_FromExt

Gets FontAwesome 5 icon for a file using its extension
Used in MyDev website

Function FA5Icon_FromExt(FileName)
 Fexx      = GetExtension(FileName)
 FA5Icon_FromExt  = "far fa-file"
 Select case UCase(Fexx)
 Case "TXT", "INI"
  FA5Icon_FromExt = "far fa-file-alt"
 Case "ZIP", "RAR", "7Z"
  FA5Icon_FromExt = "far fa-file-archive"
 Case "DOC", "DOCX"
  FA5Icon_FromExt = "far fa-file-word"
 Case "PPT", "PPTX"
  FA5Icon_FromExt = "far fa-file-powerpoint"
 Case "HTM", "HTML", "ASP", "PHP"
  FA5Icon_FromExt = "far fa-file-code"
 Case "XLS", "XLSM", "XLSX", "XLSB"
  FA5Icon_FromExt = "far fa-file-excel"
 Case "FLV", "MP4", "MPG", "MOV"
  FA5Icon_FromExt = "far fa-file-video"
 Case "JPG", "PNG", "GIF", "BMP"
  FA5Icon_FromExt = "far fa-file-image"
 Case "PDF"
  FA5Icon_FromExt = "far fa-file-pdf"
 End Select
End Function

Parameters

FileName

Views 136 Downloads 63

Perm link


ANmarAmdeen
280
Attachments
Graphics Classic ASP
Revisions

v1.0