The macro is not executed step by step

Hello folks

I have a problem with this macro and have reached the limits of my knowledge.

The macro should perform the following steps:
In Join Curves Docker select the Bezier option, then press Apply, when Apply has been executed, then the Extend option should be selected.

Now we come to my problem:
The macro executes Apply with the Extend option and not with Bezier, although the order in the code is correct. Even inserting Sleep does not change the behavior of the macro. I have also tried to control the control elements via HWND with Sendkeys BM_CLICK. The same problem occurs there. If I omit the Extend option in the code, the curve is shot with the Bezier option.

Declare PtrSafe Function SendMessage Lib "user32" Alias "SendMessageA" _
    (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Const BM_CLICK = &HF5

Sub Join_Curves_Bezier_Once()

Dim ApplyGUID As String ' GUID
Dim SelBezierGUID As String ' GUID
Dim SelExtendGUID As String ' GUID
Dim Dockr As String ' GUID

SelBezierGUID = "a5cabe8f-3403-4973-8280-bfd12f4b4223"
ApplyGUID = "1ec6f3a8-566d-6dbf-40c1-35e6402e4bd3"
SelExtendGUID = "23ce5d3a-8fdd-46cc-84f5-1513ce1d2a87"
Dockr = "d632ed56-5e70-bca1-43f8-249a6342dbf2"

Dim hwndButtonBezier As Long
Dim hwndButtonApply As Long
Dim hwndButtonExtend As Long

hwndButtonBezier = Application.FrameWork.Automation.GetItemInstanceHwnd(Dockr, SelBezierGUID)
hwndButtonApply = Application.FrameWork.Automation.GetItemInstanceHwnd(Dockr, ApplyGUID)
hwndButtonExtend = Application.FrameWork.Automation.GetItemInstanceHwnd(Dockr, SelExtendGUID)

Debug.Print "HWND Values As Long:   " & hwndButtonBezier
Debug.Print "HWND Values As Long:   " & hwndButtonApply
Debug.Print "HWND Values As Long:   " & hwndButtonExtend


'	*****  This part is not executed correctly. *****   '
Application.FrameWork.Automation.InvokeItem SelBezierGUID
Application.FrameWork.Automation.InvokeItem ApplyGUID
Application.FrameWork.Automation.InvokeItem SelExtendGUID

End Sub



Do any of you know what the problem is?

Thanks in advance.

Greetings,
Corel Mutt