0

1000 を超える連絡先を取得しようとしていますが、10000 を超えていますが、Microsoft EWS では 1000 のアイテム (連絡先) しか取得できません。ContactsFolder contactsFolder = ContactsFolder.Bind(this.service, WellKnownFolderName.Contacts,new PropertySet(BasePropertySet.IdOnly,FolderSchema.TotalCount));

            ItemView view = new ItemView(contactsFolder.TotalCount);

            //ItemView view = new ItemView(1000,0,OffsetBasePoint.Beginning+1);

            service.TraceEnabled = false;
            FindItemsResults<Item> fiResults = null;
            do
            {
                fiResults = service.FindItems(WellKnownFolderName.Contacts, view);
                PropertySet itItemPropSet = new PropertySet(BasePropertySet.IdOnly,
                ContactSchema.GivenName,
                ContactSchema.Surname,
                ContactSchema.AssistantPhone,
                ContactSchema.BusinessPhone,
                ContactSchema.BusinessPhone2,
                ContactSchema.CarPhone,
                ContactSchema.CompanyMainPhone,
                ContactSchema.HomePhone,
                ContactSchema.HomePhone2,
                ContactSchema.MobilePhone,
                ContactSchema.OtherTelephone,
                ContactSchema.Pager,
                ContactSchema.PrimaryPhone,
                ContactSchema.CompanyName,
                ContactSchema.BusinessFax,
                ContactSchema.Id);

                view.Offset += fiResults.Items.Count;
            } while (fiResults.MoreAvailable == true);
4

1 に答える 1

1

より多くのアイテムを取得するには、オフセットを使用します。マイクロソフトにはその方法に関する記事があり、コードにコメントされた部分も見られます。 http://msdn.microsoft.com/en-us/library/exchange/dd633698(v=exchg.80).aspx

于 2013-07-30T09:39:36.807 に答える