Dim file As String = "d:\test.txt" Dim oMsg = createobject("CDO.Message") Dim stm = Nothing '读取EML文件到CDO.MESSAGE,做分析的话,实际是用了下面的部分 Try stm = New ADODB.Stream() stm.Open(System.Reflection.Missing.Value,ADODB.ConnectModeEnum.adModeUnknown,ADODB.StreamOpenOptionsEnum.adOpenStreamUnspecified,"", "") stm.Type = ADODB.StreamTypeEnum.adTypeBinary'二进制方式读入 stm.LoadFromFile(file) oMsg.DataSource.OpenObject(stm,"_stream") msgbox(oMsg.From) msgbox(oMsg.To) catch ex As exception msgbox(ex.message) Finally stm.Close() End Try