Outlook sync issue persists with recurrent/recurring events

For user who dont speak german please use this part of my forum
willy
Beiträge: 10
Registriert: So 2. Aug 2020, 15:12

Outlook sync issue persists with recurrent/recurring events

Beitrag von willy »

First, another big THANKS to FJ for this amazing software. I've been using it for many years because I don't want to sync through the cloud, so please don't forget to donate!


PROBLEM: Most, but not all, of my recurring event scheduled for 15:00-15:01 change to 00:00-00:00 when I sync my Google Pixel 3a (Android client 1.0.72) with my new computer (Windows 10 Pro version 1909, Outlook 2007 SP3, MyPhoneExplorer 1.8.14). Even if I accept the sync (MPE > Outlook), it will still pop up every time. I did not have any problems with my old computer (Windows 7 Pro, Outlook 2007 SP3, MyPhoneExplorer 1.8.7).


BACKGROUND: When I first started using MPE around 2013, I found that my all day recurring appointments (e.g., birthdays) didn't work well when I changed time zones as it would store it 2020-08-02 00:00-23:59 GMT-5, so when I changed to GMT-8 the event would span 2 days 2020-08-01 21:00 to 2020-08-02 20:59. To fix this, I converted all my recurring events to be in the middle of the day 15:00-15:01 and I no longer had the issue with spanning 2 days.


CURRENT ISSUE: So, I don't know if this is an issues with upgrading to Windows 10 Pro version 1909 (there's even a 2004 available now) and/or MyPhoneExplorer 1.8.14. I am still running the same Android client 1.0.72 on the same phone, only the computer changed.
willy
Beiträge: 10
Registriert: So 2. Aug 2020, 15:12

Beitrag von willy »

UPDATE: On my new computer (still Windows 10 Pro x64 version 1909), I reverted MyPhoneExplorer from 1.8.14 to 1.8.8 (I couldn't find 1.8.7 at the time). In MPE, when I look at the initial calendar (I migrated the database from my old computer), everything looks correct with the 15:00-15:01 appointments. Literally, the second I synchronize the calendar (even before the dialog window of changes appears), I see most of my 15:00-15:01 appointments change to 00:00-00:00. However, this time after about 3 rounds (Force Outlook > MPE, then delete entries from MPE, then re-add entries to MPE), the 15:00-15:01 recurring appoints stick and no more 00:00-00:00 appointments.

Unfortunately, MPE crashes every time it tries to download the call log, so I've removed that from my multi-sync and it seems to be working. I'm hoping that we can resolves this so I can use the latest version of MPE.
gautxori
Beiträge: 48
Registriert: Fr 3. Apr 2015, 12:09

Beitrag von gautxori »

I suggest you try to install Debug release (http://www.fjsoft.at/files/MyPhoneExplo ... Update.exe) over latest 1.8.14 MPE version.

I had no problems with recurring appointments ever since.
willy
Beiträge: 10
Registriert: So 2. Aug 2020, 15:12

Beitrag von willy »

@gautxori, thanks for the suggestion. I installed 1.8.14, then installed the DebugUpdate you provided and still have the same issue :(

I believe I found the culprit. In Outlook 2007, there's a hidden field called "all day event" that is only visible when you view your calendar in a table format (e.g., All Appointments) AND you go to the field chooser to make "All Day Events" visible. This is independent of your recurrence rules (I have mine set for 15:00-15:01, a 1 minute duration). It's stupid because you can't get to this field when editing the appointment directly. What's even worse, I'm not able to uncheck the box for All Day Event (I get an error "You don't have the permission to move this item."). The error I'm experiencing applies to all my calendar events with the hidden attribute enabled.

Any ideas on how to uncheck the "all day event" attribute? The only work around is to recreate my 100+ recurring events because Outlook 2007 won't let me export and import recurring meeting in bulk.

If I export my calendar appointment to a CSV, the "all day event" field shows up there.
gautxori
Beiträge: 48
Registriert: Fr 3. Apr 2015, 12:09

Beitrag von gautxori »

willy hat geschrieben:Any ideas on how to uncheck the "all day event" attribute?.
.

You're welcome. You'd better try with a VB macro:

Code: Alles auswählen

Sub RemoveCurrentFolderRecurrences()
   Dim CalFolder As Outlook.MAPIFolder
   Dim CalItems As Outlook.Items
   Dim ResItems As Outlook.Items
   Dim sFilter As String
   Dim cAppt As Object
 
   ' Use the selected calendar folder
   Set CalFolder = Application.ActiveExplorer.CurrentFolder
   Set CalItems = CalFolder.Items
   CalItems.IncludeRecurrences = True
   'create the Restrict filter by recurrence
   sFilter = "[IsRecurring]  = True"
   Set ResItems = CalItems.Restrict(sFilter)
 
   'Loop through the items in the collection.
   For Each cAppt In ResItems
        If cAppt.IsRecurring Then
             ' cAppt.GetRecurrencePattern.PatternEndDate = Now()
              cAppt.ClearRecurrencePattern
              cAppt.Save
        End If
   Next
End Sub


based on https://www.slipstick.com/developer/cop ... gs-series/, https://docs.microsoft.com/es-es/office ... ncepattern and https://stackoverflow.com/questions/328 ... -vba-macro
willy
Beiträge: 10
Registriert: So 2. Aug 2020, 15:12

Beitrag von willy »

@gautxori, I had been playing with some VB code I found on the internet to attempt to uncheck the All Day Event flag (for images, see my post in https://answers.microsoft.com/en-us/mso ... fda1140eeb) but don't really know how to code Visual Basic effectively.

Thanks for the macro code. After running it a handful of times (not sure why it didn't change everything in one pass), it was able to remove the recurrence, which removed the All Day Event flag. Unfortunately, now I need to rebuild all the recurrence. The good news is that when you remove, then re-add the recurrence, the All Day Event flag is finally cleared.

As usual, I probably spent more time playing around with VB code than it would have been for me to just rebuild all 100+ appointments without the All day Event.

Or maybe the time zone change for all-day events has been changed since I originally tried to use MPE. That I will need to test as well.
gautxori
Beiträge: 48
Registriert: Fr 3. Apr 2015, 12:09

Beitrag von gautxori »

willy hat geschrieben:... but don't really know how to code Visual Basic effectively.
...it was able to remove the recurrence, which removed the All Day Event flag.
As usual, I probably spent more time playing around with VB code than it would have been for me to just rebuild all 100+ appointments without the All day Event.
It happens to all of us when starting coding: time flies. :( Those flies are quite distracting, and Microsoft technicians seem not to be smart enough to blow them away. But after so many scripts, I can say my processing data (be it 20,50 or 100 records) by programming macros usually takes shorter and is more constructive.
One more clue: Visual Basic is quite easy to code, and for automation in windows, be it office or even the shell (you can search for "Visual Basic for Applications", or "Visual Basic Scripting"), you will find that despite being somewhat obsolete it's still the best approach. In short, when you get stuck try to find a solution by programming a macro. But do not forget to see the sun! :)
willy
Beiträge: 10
Registriert: So 2. Aug 2020, 15:12

SOLVED: Outlook sync issue persists with recurrent/recurring

Beitrag von willy »

So my theory was correct, the Outlook attribute AllDayEvent was causing appointment synchronization issues in MPE 1.8.14 that I had not experienced in 1.8.8 and early. The only way to remove the AllDayEvent attribute was to remove the recurrence, save, then add the recurrence back. The AllDayEvent attribute will automatically enable if you create an appointment from the Month view (my typically view) because it is assuming you are creating an All Day Event.

See https://answers.microsoft.com/en-us/mso ... fda1140eeb for how I fixed my Outlook PST file so that I can run MPE 1.8.14.

Thanks to @gautxori for the help and encouragement. Unfortunately, when you remove the recurrence, it doesn't preserve the original start date. Here's another version of VB code to remove recurrence from your selection:

Code: Alles auswählen

Sub ClearRecurrence()
' Removes recurrence from selection, but loses original start date
    Dim currentExplorer As Explorer
    Dim Selection As Selection
    Dim oAppt As AppointmentItem 'Object
    
    Set currentExplorer = Application.ActiveExplorer
    Set Selection = currentExplorer.Selection

    For Each oAppt In Selection
        oAppt.ClearRecurrencePattern
        oAppt.Save
    Next
End Sub
gautxori
Beiträge: 48
Registriert: Fr 3. Apr 2015, 12:09

Re: SOLVED: Outlook sync issue persists with recurrent/recur

Beitrag von gautxori »

willy hat geschrieben:Unfortunately, when you remove the recurrence, it doesn't preserve the original start date.
you can try to change your for loop with:

Code: Alles auswählen

For Each oAppt In Selection
	If oAppt.IsRecurring Then
		Set RP = oAppt.GetRecurrencePattern
		ArrRecPat = Array(RP.RecurrenceType, RP.PatternStartDate, RP.PatternEndDate, _
		RP.DayOfMonth, RP.DayOfWeekMask, RP.MonthOfYear, RP.Interval, RP.Instance, RP.Duration)
		Set RP = Nothing
		oAppt.ClearRecurrencePattern
		oAppt.AllDayEvent = False
		With oAppt.GetRecurrencePattern
			.RecurrenceType = ArrRecPat(0)
			.PatternStartDate = ArrRecPat(1)
			.PatternEndDate = ArrRecPat(2)
			.DayOfMonth = ArrRecPat(3)
			.DayOfWeekMask = ArrRecPat(4)
			.MonthOfYear = ArrRecPat(5)
			.Interval = ArrRecPat(6)
			.Instance = ArrRecPat(7)
			.Duration = ArrRecPat(8)
		End With
		oAppt.Save
	End If
Next
Antworten