表单对象通过NotesDatabase对象的GetForm方法获取。
然后将跟对象压入NotesNoteCollection获取其设计文档。
如果设置字符集,将会有域$MimeCharSet,数值如UTF-8。
以下伪代码供你参考。
Dim db As NotesDatabase
Dim nc As NotesNoteCollection
Dim form As NotesForm
...
Set form=db.GetForm(..)
Set nc=db.CreateNoteCollection(False)
Call nc.BuildCollection()
Call nc.Add(form)
Dim NoteID As String
Dim designDoc As NotesDocument
NoteID=nc.GetFirstNoteID()
If NoteID<>"" Then
Set designDoc=db.GetDocumentByID(NoteID)
If designDoc.HasItem("$MimeCharSet") Then
字符集=designDoc.GetItemValue("$MimeCharSet")(0)
Else
字符集=默认值
End If
End If