' Return the file type ' expC1 File name with the full path Public Function FileType(ByVal tcFile As String) As String Dim lcString As String = "" lcString = FileToStr(tcFile) If lcString.Length < 4 Then Return "" End If If Left(lcString, 3) = Chr(255) + Chr(232) + Chr(255) Then Return "JPG" End If If Left(lcString, 3) = "GIF" Then Return "GIF" End If If Mid(lcString, 42, 3) = "EMF" Then Return "EMF" End If If Left(lcString, 4) = Chr(215) + Chr(205) + Chr(198) + Chr(154) Then Return "WMF" End If If Left(lcString, 4) = Chr(77) + Chr(77) + Chr(0) + Chr(42) Then Return "TIF" End If If Left(lcString, 4) = Chr(137) + "PNG" Then Return "PNG" End If If Left(lcString, 2) = "BM" Then Return "BMP" End If If Left(lcString, 3) = "CWS" And Asc(Mid(lcString, 4, 1)) < 16 Then Return "SWF" End If If Left(lcString, 3) = "FWS" And Asc(Mid(lcString, 4, 1)) < 16 Then Return "SWF" End If Return "" End Function End ClassNow, I need to add file type detection for ZIP, XML, DOC, XLS, PDF and TXT. Is there file detection for some of those I could add?