Hello,

I found the solution.what I did, I programatically kill that pop up and then open my outlook window. below is my code:

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Public Const WM_CLOSE = &H10

Public Sub Kill_Program(ProgramName As String)
Dim WinWnd As Long
'Stop
WinWnd = FindWindow(vbNullString, ProgramName)

If WinWnd <> 0 Then
MsgBox "Outlook E-mail Properties Popup will be closed."
PostMessage WinWnd, WM_CLOSE, 0&, 0&
' Else
' ' do nothing or
' MsgBox "No Popup of name " & ProgramName & " exists."
End If
End Sub

Ref Link:

http://www.vbforums.com/showthread.php?522026-RESOLVED-How-to-programmatically-kill-user-process-from-VB6

hope it will help others also.

Thanks

Edited 2 Years Ago by krunal1986: link added

This question has already been answered. Start a new discussion instead.