2011-09-15 13 views
0

下記のコードをチェックしてください...このLotus Notes文書(.nsf)ファイルを読むのは正しいですか?そして、私はコンソールメッセージを "connected"(connected .....ロータスノート文書を読むc#

どのように各文書の項目にアクセスできますか?たとえば、件名、人、日付、時刻などが必要です。

文書のすべての項目を繰り返し処理するにはどうすればよいですか?

どのように添付ファイルを抽出できますか?

また、私は "ドキュメントを読み込んでいるかどうか"を知っていますか? ドキュメントを読むことの意味は何ですか...それ以降、私はexport/migrateをsharepointにする必要があります。 Thatsは主要なボトムラインです。

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using Domino; 

namespace ConsoleApplication4 
{ 
    class Program 
    { 
     static void Main(string[] args) 
     { 
      //Creating the notes session and passing password 
      NotesSession session = new NotesSession(); 
      session.Initialize("[email protected]"); 
      NotesDatabase NotesDb = session.GetDatabase("vm-domino6", "mts.nsf", false); 

      if (NotesDb == null) 
      { 
       System.Console.WriteLine("Can not connect to server."); 
      } 
      else 
      { 
       System.Console.WriteLine("Connected"); 
      } 

      Domino.NotesDocumentCollection col = NotesDb.AllDocuments; 
      for (int i = 0; i < col.Count; ++i) 
      { 
       Domino.NotesDocument doc = col.GetNthDocument(i); 
      } 
     } 
    } 
} 
+0

ご質問がある** **広すぎる - 二つの別々の質問に分割:(1)(2)輸入、Lotus Notesドキュメントを読んでドキュメントをSharePointにエクスポートします。 –

答えて

1

読むにはすべてのコレクションの文書が試してみてください。

var document = col.GetFirstDocument(); 
while (document != null) 
{ 
    document = col.GetNextDocument(document); 
} 
関連する問題