Держи:
| Код |
Public Function UUDecodeToFile(strUUCodeData As String, strFilePath As String)
Dim vDataLine As Variant Dim vDataLines As Variant Dim strDataLine As String Dim intSymbols As Integer Dim intFile As Integer Dim strTemp As String If Left$(strUUCodeData, 6) = "begin " Then strUUCodeData = Mid$(strUUCodeData, InStr(1, strUUCodeData, vbLf) + 1) End If If Right$(strUUCodeData, 4) = "end" + vbLf Then strUUCodeData = Left$(strUUCodeData, Len(strUUCodeData) - 7) End If intFile = FreeFile Open strFilePath For Binary As intFile vDataLines = Split(strUUCodeData, vbLf) For Each vDataLine In vDataLines strDataLine = CStr(vDataLine) intSymbols = Asc(Left$(strDataLine, 1)) strDataLine = Mid$(strDataLine, 2, intSymbols) For i = 1 To Len(strDataLine) Step 4 strTemp = strTemp + Chr((Asc(Mid(strDataLine, i, 1)) - 32) * 4 + _ (Asc(Mid(strDataLine, i + 1, 1)) - 32) \ 16) strTemp = strTemp + Chr((Asc(Mid(strDataLine, i + 1, 1)) Mod 16) * 16 + _ (Asc(Mid(strDataLine, i + 2, 1)) - 32) \ 4) strTemp = strTemp + Chr((Asc(Mid(strDataLine, i + 2, 1)) Mod 4) * 64 + _ Asc(Mid(strDataLine, i + 3, 1)) - 32) Next i Put intFile, , strTemp strTemp = "" Next Close intFile End Function
|
Не знаешь случайно как происходит авторизация на SMTP ящике? |