Link to home
Start Free TrialLog in
Avatar of shacho
shacho

asked on

Making Outlook Visible

How can I Show/Hide the Outlook object programatically.  In Excel and Word there is a .visible property, but I cannot find a similar property in Outlook.

Mike
Avatar of shacho
shacho

ASKER

Here's what I'm trying to do

'EXCEL VBA ROUTINE
Sub MyRoutine()
    Dim OLApp As Object
    On Error Resume Next
        Set OLApp = GetObject(, "Outlook.Application")
        If Err <> 0 Then Set OLApp = CreateObject("Outlook.Application")
    On Error GoTo 0
    If OLApp Is Nothing Then Exit Sub

'I WANT TO MAKE OUTLOOK VISIBLE HERE

    Set OLApp = Nothing
End Sub
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shacho

ASKER

Cool.  I tried operating on Explorers initially but couldn't get it to work.  It didn't occur to me that you can have zero Explorers.
I'm really trying to get is Outlook.Session.CurrentUser.  This is one of those protected properties that initiates a security dialog with the user.  For some reason that dialog cannot be created unless an explorer is visible.  From an object model or Windows perspective, can you tell me why this is the case?  Is this dialog a child window of an Explorer object?

Mike


SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shacho

ASKER

Well anyway, it works now and that's the goal.  Thanks a lot for your help.  I have posted a new, semi-related question.  Please take a look if you can.
https://www.experts-exchange.com/questions/22041767/Getting-an-Elusive-Field-from-an-LDAP-Query.html

Cheers,

Mike
You're welcome.  I followed the link to the other question, but the page says it's been deleted.
Avatar of shacho

ASKER

Yeah - I managed to figure it out before anybody saw it.  Thanks again!

Mike
No problem.