2015年8月17日 星期一

[AP] 把Author欄位塞進去

'//把Author欄位塞進去

Call doc.ReplaceItemValue ("Authors",CalcName(varEmpInfo(2),"Canonical"))

CalcName是我在AgnesLibrary 裡寫的Function

Function CalcName(pName As String,pType As String) As String
' 1. 參數: 1:欲轉換的Notes ID
     '                2: 指定傳回NotesId型態 
'                     Canonical = @Name([Canonical],username)
'                     Abbreivate = @Name([Abbreiave],username)
'                    CommonName = @Name([CNp,username)
'2. 傳回文字字串:依指定的型態傳回指定型態的Notes Id


Dim namePerson As NotesName

Set namePerson = New NotesName(pName)
Select Case Ucase(pType)
Case "CANONICAL"
CalcName = namePerson.Canonical
Case "ABBREVIATE"
CalcName = namePerson.Abbreviated
Case "CN"
CalcName = namePerson.Common
Case "O"
CalcName = namePerson.Organization 
End Select
End Function

沒有留言:

張貼留言