2017-11-17 247 views
0

如何查找使用items.find方法設置的聯繫人項目的索引?找到物品後,我希望能夠移動到下一個物品,但我的代碼將我發送到集合中的第一個物品。我的計劃的一個濃縮版本低於...使用Items.find查找Item.index

dim ColItms as items 
dim CI as contactItem 
Dim CIindex as integer 

set CI= ColItms.find("[CompanyName] = ""IBM""") 
CIindex = CI.???? ''''' This shows what I'm wanting to do, but don't know how 

' now advance to next item in collection 
set ci = ColItms.item(CIindex +1) ' i think this would work if I could find CIindex 

set ci = ColItms.GetNext ' this fails as it returns the 1st item in the collection 

現在一切似乎工作是遍歷集合中的每個項目,看它是否找到聯繫人匹配,

回答

0

項目沒有內在指標,只有一個條目id。 要查找下一場比賽,請使用Items.FindNext