There simply is no Application.Visible property implemented by Microsoft. You just have to define an explorer. For example, if you want to show the inbox folder in Outlook you could implement:
Code: Select all
static function ShowInbox()
local oNameSpace, oInbox
local oExplorer
oOutlook := GetOutlookObject()
IF oOutlook == nil
return {}
ENDIF
oNameSpace := oOutlook:Get( "GetNameSpace", "MAPI" )
oInbox := oNameSpace:Get( "GetDefaultFolder", 6 ) // Enumeration: https://msdn.microsoft.com/en-us/vba/outlook-vba/articles/oldefaultfolders-enumeration-outlook
oExplorer := oOutlook:Explorers():Add(oInbox, 0) // Enumeration: https://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.olfolderdisplaymode.aspx
oExplorer:Activate()
return nil
static function GetOutlookObject()
local oOutlook
TRY
oOutlook := GetActiveObject ( "Outlook.Application" )
CATCH
TRY
oOutlook := CREATEOBJECT( "Outlook.Application" )
CATCH
MsgStop("Cannot start outlook!")
return .f.
END
END
ENDIF
return oOutlook
Properties Top, Left, Height and Width are available to the explorer-object:
https://msdn.microsoft.com/VBA/Outlook- ... ct-outlook