作成者カテゴリ返答の対象
公開
二児の父
02/10/2010 06:00 PM
文書リンクアイコン フィールドサイズを越えた文章の取得
Re: フィールドサイズを越えた文章の取得

当方(Notes8.0.1)では次のエージェントで文書を再現できました。

Dim ss As New NotesSession
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem
Set doc = ss.CurrentDatabase.CreateDocument
doc.Form = "Main"
Set rtitem = New NotesRichTextItem(doc, "Body")
For i = 1 To 3277
Call rtitem.AppendText("AAAAAAAAAA")
Next
Call doc.Save(True, True)
v = doc.GetItemValue("Body")
doc.Body1 = v

'Dim item As NotesItem
'Set item = doc.GetFirstItem("Body1")
'If item.ValueLength > 32000 Then
'item.IsSummary = False
'End If
Call doc.Save(True, True)

このエージェントで作成した文書は
・ビュー上でダブルクリックする
・FIELD Body1 := @DeleteField を実行する
と「フィールドが..」でエラーになりました。

また、Lotus Scriptで NotesDocument オブジェクトは取得できますが、デバッグモードでプロパティを見ると、日時がゼロだったりでまるでオブジェクトが初期化されたような感じです。

それから、次のようにしてXMLへ書き出せれば...と考えたのですが exporter.Process でエラーになりアイテムなしのファイルができました。

<宣言は省略..>
Set dc = ss.CurrentDatabase.Search(|@Length(Body1) > 32000|, Nothing, 0)
Set nc = ss.CurrentDatabase.CreateNoteCollection( False )
Call nc.BuildCollection
Call nc.Add( dc )
Set stream = ss.CreateStream
filename$ = ss.CurrentDatabase.Title & ".xml"
If Not stream.Open( filename$ ) Then
Exit Sub
End If
Call stream.Truncate
Dim exporter As NotesDXLExporter
Set exporter = ss.CreateDXLExporter(nc, stream)
Call exporter.Process

もはや手詰まりの感が....

なお、文書を再現する Lotus Script の中でコメントアウトした5行を有効にして作成した文書ではエラーになりません。


[Previous Main Document]
フィールドサイズを越えた文章の取得 (Ru)
. . Re: フィールドサイズを越えた文章の取得 (Vit)
. . . . Re: フィールドサイズを越えた文章の取得 (Ru)
. . . . . . Re: フィールドサイズを越えた文章の取得 (NANA)
. . . . . . . . Re: フィールドサイズを越えた文章の取得 (Ru)
. . . . . . . . . . Re: フィールドサイズを越えた文章の取得 (わろ)
. . . . . . . . . . . . Re: フィールドサイズを越えた文章の取得 (Ru)
. . . . . . . . . . . . . . Re: フィールドサイズを越えた文章の取得 (わろ)
. . . . . . . . . . . . . . . . Re: フィールドサイズを越えた文章の取得 (わろ)
. . . . . . . . . . . . . . . . . . Re: フィールドサイズを越えた文章の取得 (Ru)
. . . . . . . . . . . . Re: フィールドサイズを越えた文章の取得 (二児の父) * 現在地 *
[Next Main Document]