.restrict results changing after moving to Exchange online

allanreese

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Hi


After running our own Exchange server 2010 we have migrated to Exchange online. I have quite a lot of VBA code which I sill need:)

Somehow when I use the .restrict method on date fileds in contact form i don't get the same results than when running against our Exchange server 2010. I do the testing with the same Outlook 2016 (32bit) client. The code in question could be this:

Code:
    Dim objNameSpace As NameSpace
    Dim objContactFolder
    Dim objContacts
    Dim objContact As Outlook.ContactItem
    Dim strMedlemNr
    Dim counter
    Dim date_to_search As Date

    Set objNameSpace = Application.GetNamespace("MAPI")
    Set objContactFolder = GetPublicFolder(SpellFavorites & "\SPF\Spillere")
    Set objContacts = objContactFolder.Items
    
    date_to_search = #3/19/2005# '5. March 2019
    s_date = "[Birthday] = '" & date_to_search & "'"
    
    Set objContactRestricted = objContacts.Restrict(s_date)

    MsgBox objContactRestricted.Count
When running against Exchange 2010 I get 1 hit and when running against Exchange online I doesn't get hits at all. Folder content on the 2 servers are identical.

Looking into the folder with MFCMAPI I can look this item up:

Code:
    <property tag = "0x3A420040" type = "PT_SYSTIME">
        <ExactNames>PR_BIRTHDAY, PidTagBirthday</ExactNames>
        <Value>11:59:00 19-03-05</Value>
        <AltValue>Low: 0x0962DA00 High: 0x01C52C7B</AltValue>
    </property>
Should prove me one hit:)

I don't have any problems with using restrict on text values.

Anybody who knows why .restrict is performing otherwise on Exchange online compared to Exchange 2010?

- Allan
 
Thread starter Similar threads Forum Replies Date
K Disabling import/export button to restrict PST creation Using Outlook 3
L Restrict accepted appts to specific calendar Using Outlook 2
oliv- .RESTRICT returning birthdays regardless of the filtering date Outlook VBA and Custom Forms 8
M Using .Restrict with a UserProperty in an Exchange folder Outlook VBA and Custom Forms 4
JorgeDario restrict access to a certain folder with vba Outlook VBA and Custom Forms 3
JorgeDario How to restrict the creation of new folders? Outlook VBA and Custom Forms 2
C Outlook 2010, Need to restrict domain users from installing any sort of a addin in outlook Using Outlook 2
V How to restrict users to not change Download Headers only Using Outlook 2
L Restrict group creation in Outlook Using Outlook 4
J Restrict info in Contacts Using Outlook 1
E how to restrict user to change pop account settings Using Outlook 1
A Restrict users to 1 computer at a time. Using Outlook 1
M unable to open PDF or (http, www or utube) link attachment to outlook messages because of ' RESTRICT Using Outlook 1
S Restrict method question on email. What am I doing wrong? Outlook VBA and Custom Forms 2
M Restrict throwing 'Condition is not valid' error Outlook VBA and Custom Forms 5
M Restrict Appointments by EntryID not working Outlook VBA and Custom Forms 1
T How can you include Junk Email in Search Results like you can include Deleted Items? Using Outlook 3
M How to export Voting Results with user names and their responses Outlook VBA and Custom Forms 13
V Outlook 2016 will not move emails in search results Using Outlook 4
S Reboot of frozen windows7 results in changed outlook 2007 settings Using Outlook 1
P How to export voting results using VBA? Outlook VBA and Custom Forms 2
T Compacting Outlook 2010 OST results in old emails being re-sent Using Outlook 6
T Delete Emails from search results Outlook VBA and Custom Forms 1
S Auto move search results to folder Outlook VBA and Custom Forms 0
D Search Results Highlighting even in the search folders Using Outlook 1
M Scan PST results Using Outlook 2
0 Emails showing up in Search results, but not visible otherwise Using Outlook 3
Z outlook 2007 - opening a contact from the search results doesn't use the custom form Using Outlook 10
D Outlook 2010 Rules: fwd meeting invitation results in winmail.dat not .ics Using Outlook 4
Jennifer Murphy ScanPST results discarded? Using Outlook 10
A Outlook 2007 message search results loses focus Using Outlook 7
J Calendar Search by Category not showing expected results Using Outlook 7
S OL 2007 user typing. into file box results in .htm.msg Using Outlook 5
O Inbox Search Results won't update when deleting or moving an email Using Outlook 12
V No results when I SEARCH contacts under COMPANY NAME . . . . Using Outlook 3
K Outlook insert clip art, no results found...address book contacts only show up Using Outlook 5
H Changing the default form in Outlook results in plain text Using Outlook 5
E How do I PRINT Outlook Contacts SEARCH RESULTS Using Outlook 2
J Missing HUB DNS record results in mail piling in queue, no failover? Exchange Server Administration 2
M PowerShell Get-Mailbox truncates fields in the results Exchange Server Administration 3
T Mailbox Statistics is not showing results to POP3 clients Exchange Server Administration 3
F Search all Address books for an e-mail address and get all the results in one view. Using Outlook 2
M Outlook 2010 search returns no results Using Outlook 3
W Microsoft Outlook 2010 Instant Search Encountered a Problem While Trying to Display Results. Using Outlook 1
I Mailbox Audit log don't return results. Exchange Server Administration 4
B search results may be incomplete ........... Using Outlook 2
J Instant search greys out Outlook contact results, and has multiple greyed out results.? Using Outlook 3
P I have no See More Results in my search results page. Using Outlook 2
M Lock up results in missing outlook pst file Using Outlook 4
E BCM Search does not show results BCM (Business Contact Manager) 1
Similar threads


















































Top