原理:文档中的域值是数组形式的 。多值域的值类似于一行多列的数组,下标从0开始。
假定域名为Employee,类型为多值文本域,文档中此域的值为:james,robin,alfred。
计划使用LS的得到返回值为:jamesrobinalfred。
方法1、直接获取
strEmployee = doc.Employee(0) +doc.Employee(1) +doc.Employee(2)
方法2、使用Evaluate声明
Dim strEmployee As Variant
Const NotesMacro$ = "@Implode(Employee)"
strEmployee = Evaluate(NotesMacro$,doc)
Msgbox Cstr(strEmployee(0)) 
方法3、使用GetItemValue方法
 Dim itmEmployee As Variant
 itmEmployee = doc.GetItemValue("Employee ")
 Forall o In itmEmployee
  Msgbox Cstr(o)
 End Forall
方法4、转化为数组处理
Dim i,j As Integer
i = 0
arrEmployee = doc.GetItemValue("Employee ")
For j=Lbound(arrEmployee) To Ubound(arrEmployee)
 Msgbox Cstr(arrEmployee(i)) 
 i=i+1
Next  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-05
  • 2021-07-27
  • 2021-07-06
  • 2021-10-27
  • 2022-12-23
  • 2021-12-03
猜你喜欢
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
相关资源
相似解决方案