作成者カテゴリ返答の対象
公開
アリエル
06/23/2003 05:54 PM
文書リンクアイコン V001 VARIANTはコンテナ エラーについて
返答ありがとうございます。

Variant型を使ってないのですが、このエラーが表示されるのです。
strContentには、複数の値がセットされるので、配列を使わないと出来ないのでしょうか??

Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim rtitem As NotesRichTextItem

Dim ws As New NotesUIWorkspace

Dim FileNum As Long
Dim strValue As String
Dim IngCnt As Long
Dim strTitle As String
Dim strContent As String

Set db=s.CurrentDatabase

FileNum=Freefile
Open "C:\Test.txt" For Input As FileNum'ファイルを開く

Do Until Eof(FileNum)
Line Input #FileNum , strValue'各行を取得する
IngCnt=Instr(strValue,",")'カンマの位置を取得する
If IngCnt <> 0 Then

strTitle = Left(strValue,IngCnt -1)'カンマより左
strContent = Mid$(strValue,IngCnt +1)'カンマより右

Set doc=db.CreateDocument
Call doc.ReplaceItemValue("Form","Group")
Call doc.ReplaceItemValue("ListName",strTitle)
Set rtitem = New NotesRichTextItem(doc,"Members")
Call rtitem.AppendText(strContent)

Call doc.Save(True,True)

End If
Loop

Close #1

Name "C:\Test.txt" As "C:\"+Format$(Today(),"yyyy-mm-dd")+"Test.txt"

Call ws.ViewRefresh

End Sub


[Previous Main Document]
V001 VARIANTはコンテナ エラーについて (アリエル)
. . エラーの原因 (メフィラス星人)
. . . . やさしく書かないと、、、^^; (けん)
. . . . . . 返答ありがとうございます。 (アリエル) * 現在地 *
[Next Main Document]