Change FileOpen File in Event FileOpenPreNotify

Dear all,

I'm looking for a function to change the document that will be opened after the FileOpenPreNotify Event. I'm able to catch the event but don't know the function to set the FileOpen file (if this is possible).

Private Function swApp_FileOpenPreNotify(ByVal FileName As String) As Long
    Debug.Print "FileOpenPreNotify: " & FileName

    If FileName Like "*TEST.SLDPRT" Then

        ' Change FileOpen document

        swApp.SetFileOpenFileOrSomethingLikeThis "C:\\TEST2.SLDPRT"

    End If
End Function

Thanks in advance,

Wout Rikkerink

SolidworksApi macros