Для начала нужно конвертировать текст сабжа в читаемый. Имею строку типа =?koi8-r?B?88TBzSDLz9TUxcTW?=
Убирая ненужное получаю 88TBzSDLz9TUxcTW. Еще имею найденный в поиске код:
- Код: Выделить всё
Option Explicit
Private Declare Function WideCharToMultiByte Lib "kernel32" (ByVal codepage As Long, ByVal dwFlags As Long, _
ByVal lpWideCharStr As String, ByVal cchWideChar As Long, ByVal lpMultiByteStr As String, ByVal cchMultiByte As Long, ByVal lpDefaultChar As String, ByVal lpUsedDefaultChar As Long) As Long
Private Declare Function MultiByteToWideChar Lib "kernel32" (ByVal codepage As Long, ByVal dwFlags As Long, ByVal lpMultiByteStr As String, ByVal cchMultiByte As Long, ByVal lpWideCharStr As String, ByVal cchWideChar As Long) As Long
Private Const MB_PRECOMPOSED = &H1
Public Function Convert(ByVal strSrc As String, ByVal nFromCP As Long, ByVal nToCP As Long) As String
On Error Resume Next
Dim nLen As Long
Dim strDst As String
Dim strRet As String
Dim nRet As Long
nLen = Len(strSrc)
strDst = String(nLen * 2, Chr(0))
strRet = String(nLen * 2, Chr(0))
nRet = MultiByteToWideChar(nFromCP, MB_PRECOMPOSED, strSrc, nLen, strDst, nLen)
nRet = WideCharToMultiByte(nToCP, 0, strDst, nRet, strRet, nLen * 2, ByVal 0, 0)
Convert = Left$(strRet, nRet)
End Function
Заодно вопрос: Как перекодировать такое: =?KOI8-R?Q?=F2=E1C=F3=F9=ECO=FE=EB=E9?=