"Generate CATpart from product..." and SENDKEYS no works

LECLERC Sebastien

"Generate CATpart from product..." and SENDKEYS no works

Hi :)

I try to Convert CATParts to CATProducts with use :
 CATIA.StartCommand ("Generate CATpart from product...")

But no works, I need to do ENTER, but Enter is oki in VBA windows, impossible to activate the little Windows messages for do OKI.

Idea?

Option Explicit

Sub CATMain()

Dim Doc
Set Doc = CATIA.ActiveDocument

Dim StrProd
Set StrProd = Doc.Product

Dim Sel1
Set Sel1 = Doc.Selection
Sel1.Add StrProd

CATIA.StartCommand ("Generate CATpart from product...")

AppActivate ("CATIA V5")

Dim ActWin As Window
Set ActWin = CATIA.Windows.Item(Doc.Name)
ActWin.Activate

Application.Wait (Now + TimeValue("00:00:01"))
AppActivate ("Generate CATPart from Product")
SendKeys "{Enter}", True

End Sub