.restrict results changing after moving to Exchange online

Status
Not open for further replies.

allanreese

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
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
R How to restrict GWSMO sync to Outlook Send/Receive cycles Using Outlook 0
B oContacts.Items.Restrict Misses Some Contacts Outlook VBA and Custom Forms 3
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
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
A Any way to force sort by/group by on search results with VBA? Outlook VBA and Custom Forms 1
H Outlook 2019 intermittent search results Using Outlook 0
M Disable Contact Card Results when using "Search People" in Outlook Ribbon Using Outlook 7
M Outlook, send to > mail recipient - results in plain text email Using Outlook 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 BCM Search does not show results BCM (Business Contact Manager) 1
S Perform Search and Display Results Outlook VBA and Custom Forms 3
J Calendar events created on iPhone automatically changing default alert from 'None' to 'Time of Event' Using Outlook.com accounts in Outlook 0
F Auto changing email subject line in bulk Using Outlook 2
K Changing the Deleted Items location in Outlook 2019 Using Outlook 2
MattC Changing the font of an email with VBA Outlook VBA and Custom Forms 1
V Outlook 2021 Can anyone explain why my Outlook views keep changing?! Using Outlook 2
wayneame Changing the Form Used by Existing Task Items in a Folder Outlook VBA and Custom Forms 4
S Changing Message Class Outlook VBA and Custom Forms 4
C Pop Server Changing Verizon/Aol to Yahoo Using Outlook 6
P Outlook tasks keeps changing (updating) dates that I type Using Outlook 2
e_a_g_l_e_p_i Changing where data .pst is saved to Using Outlook 3
P Changing the font that the task view shows Using Outlook 5

Similar threads

Back
Top