Results 1 to 11 of 11

Thread: how to programatically close outlook model pop up in vb6.0?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    28

    how to programatically close outlook model pop up in vb6.0?

    Hello,

    how to programatically close outlook model pop up in vb6.0?

    Thanks,
    Krunal

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: how to programatically close outlook model pop up in vb6.0?

    Do you mean that dialog the pops up?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    28

    Re: how to programatically close outlook model pop up in vb6.0?

    Yes,
    I have model pop up open in outlook and when i try to send mail from my VB application then outlook gives error like "A dialogue box is open. Close it and try again."
    Attached Images Attached Images  

  4. #4
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: how to programatically close outlook model pop up in vb6.0?

    When do you receive the pop up?
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    28

    Re: how to programatically close outlook model pop up in vb6.0?

    While I am pressing a 'send' button to send a mail.
    I am getting error at OutMail.Display.

  6. #6
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: how to programatically close outlook model pop up in vb6.0?

    While that is not the message I was thinking of I think that two can only be hidden using a third-party add-in. Have a look at Redemption (see post #2 for link) that might do what you need.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    28

    Re: how to programatically close outlook model pop up in vb6.0?

    Thanks for the solution, but is there any other way that can solve my problem?
    can we have some outlook properties or code that can check or close the popup programatically? I don't want to use any third party add-in.

  8. #8
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: how to programatically close outlook model pop up in vb6.0?

    There might be a way if you reference Microsoft Outlook from within your program.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  9. #9
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: how to programatically close outlook model pop up in vb6.0?

    I don't want to use any third party add-in.
    you may be able to use API from your vb program to find the window and close, findwindow, findwindowex and sendmessage
    no code will run in outlook or outlook object while dialog is open

    best to find what fires the error dialog and prevent its occurrence
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Oct 2012
    Posts
    28

    Re: how to programatically close outlook model pop up in vb6.0?

    Hi Nightwalker83,

    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.p...ocess-from-VB6

    hope it will help others also.

    Thanks
    Last edited by krunal.itaction; Apr 15th, 2014 at 06:24 AM.

  11. #11
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: how to programatically close outlook model pop up in vb6.0?

    Glad you found a solution! Don't forget to mark the thread "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width