' 附件
wscript.echo oMsg.Attachments.Count
if oMsg.Attachments.Count > 0 Then
Dim attach 'as CDO.BodyPart
For Each attach In oMsg.Attachments
wscript.echo attach.ContentMediaType '附件文件类型
wscript.echo attach.FileName '附件文件名
wscript.echo attach.GetDecodedContentStream.SaveToFile(attach.FileName, 2) '将附件二进制数据保存为源文件(1=不存在时新建/存在时报错(默认), 2=不存在时新建/存在时覆盖)
Next
End if