我要100元呢还是100分呢?
outlook应该有这方面的接口

解决方案 »

  1.   

    我是有读取*.msg文件的代码,可惜,我不想卖!
    你查查msdn应该可以得到一些帮助的。
    这是其中的读取内容的一个函数,当然,怎么找到OUTLOOK里面的文件,那是你的事情了public Outlook.MailItem olApp_Mail; 
    private void ReViewMailContent() 

        object refMissing = System.Reflection.Missing.Value; 
        string strFN; 
        int intdgIndex = 0; 
        
        MainForm.StatusBar1.Panels(0).Text = "Now, Opening the mail file! Please Wait..."; 
        rtbMailContent.Text = ""; 
        if (dgMailList.CurrentRowIndex == -1) { 
            MainForm.StatusBar1.Panels(0).Text = "Ready"; 
            return; // TODO: might not be correct. Was : Exit Sub 
        } 
        else { 
            intdgIndex = (int)dgMailList.Item(dgMailList.CurrentRowIndex, 6); 
            olApp_Mail = MailCol.Item(intdgIndex); 
            if (bolActivateOutlook == false) { 
                if ((olApp.ActiveExplorer == null) == false) { 
                    try { 
                        Interaction.AppActivate(olApp.ActiveExplorer.Caption); 
                    } 
                    catch (Exception ex) { 
                        
                    } 
                } 
                bolActivateOutlook = true; 
                Timer1.Start(); 
            } 
            try { 
                rtbMailContent.Text = "寄件人: " + olApp_Mail.SenderEmailAddress + " " + olApp_Mail.SentOn + Constants.vbCrLf; 
                    rtbMailContent.Text += "收件時間: " & olApp_Mail.ReceivedTime  + Constants.vbCrLf; 
                    rtbMailContent.Text += "收件人: " & olApp_Mail.To  + Constants.vbCrLf; 
                    rtbMailContent.Text += "副本: " & olApp_Mail.CC  + Constants.vbCrLf; 
                    rtbMailContent.Text += "附件和附圖數量: " + olApp_Mail.Attachments.Count + Constants.vbCrLf; 
                    rtbMailContent.Text += "主題: " + olApp_Mail.Subject  + Constants.vbCrLf; 
                    rtbMailContent.Text +=   Constants.vbCrLf; 
                    rtbMailContent.Text += olApp_Mail.Body        } 
            catch (Exception ex) { 
                MainForm.StatusBar1.Panels(0).Text = "System Error!"; 
                return;         } 
        } 
        MainForm.StatusBar1.Panels(0).Text = "Ready"; 
        

      

  2.   

    My god, mailitem 直接就有save as方法,怎么就没有人知道。
      

  3.   

    My god, mailitem 直接就有save as方法,怎么就没有人知道。
    现在的问题是,每次使用outlook,都有跳出一个提示框。(网上说,outlook2003就是这样的)。结果,这个不符合上面的要求。所以,只能直接读里面的文本。