Hi everyone!!!

Why is Setparent not working on modal forms but works perfect with modeless forms?

Here is my code on module.

Code:
Public Sub GrabMicrosoftWord(ByVal wName As String)
Dim MicWord As Long
               
    MicWord = FindWindow(vbNullString, wName & ".doc - Microsoft Word")
        If MicWord = 0 Then
            Exit Sub
        Else
            SetParent MicWord, Form1.hwnd
        End If

End Sub
I call it like.

Code:
Form1.Show vbModal
GrabMicrosoftWord (wName)
vbmodal won't trigger SetParent. What is the workaround for this thanks?


-zynder