使用 VB.Net 讀取 Outlook Express 信件



參考來源:http://topic.csdn.net/t/20040806/00/3247242.html

方法一:

Dim   olApp   As   Outlook.Application
dim   olApp   as   New   Outlook.Application

Dim   olApp   As   Object
dim   olApp   as   CreateObject(”Outlook.Application”)

方法二:

regsvr32   msmapi32.ocx
——————————————-

Dim   mapisession   As   New   MSMAPI.MAPISession
Dim   mapimessage   As   New   MSMAPI.MAPIMessages

mapisession.SignOn()
mapisession.DownLoadMail   =   True

mapimessage.SessionID   =   mapisession.SessionID

mapimessage.FetchSorted   =   True
mapimessage.FetchUnreadOnly   =   False

mapimessage.FetchMsgType   =   “”
mapimessage.Fetch()

Dim   size   As   Integer   =   mapimessage.MsgCount
Dim   i   As   Integer
Dim   c   As   Integer   =   0

For   i   =   0   To   (size   -   1)

mapimessage.MsgIndex   =   i
”””””””””””””’
Next

Leave a Reply

CAPTCHA 驗證圖片
更換一張圖片