GetSelectNamesDialog - specify display position (1 Viewer)

AOB

Registered User.
Local time
Today, 05:15
Joined
Sep 26, 2012
Messages
615
Hi there,

I'm using the GetSelectNamesDialog from Outlook as a means for users to identify / select contacts :

Code:
Dim appOutlook As Object
Dim objNameSpace As Object
Dim objSelectNamesDialog As Object

Set appOutlook = CreateObject("Outlook.Application")
Set objNameSpace = appOutlook.GetNamespace("MAPI")
Set objSelectNamesDialog = objNameSpace.GetSelectNamesDialog

With objSelectNamesDialog
    .ShowOnlyInitialAddressList = True
    .NumberOfRecipientSelectors = 0 ' olShowNone
    .AllowMultipleSelection = False
    If .Display Then
        ' Do stuff with the address entry object etc.
    End If
End With

Works great but the only niggle I have with it is that the dialog always appears in the top-left corner of the screen (and, with a multi-screen display, not necessarily on the screen hosting the database application) So a user might click the button to pull up the dialog but the dialog isn't immediately obvious because it's in some other random location.

Does anybody know if it's possible to specify that the dialog opens in the centre of the active screen (or anywhere more relevant to where it was "called" from?)

Preferably without the use of Windows API's although I suspect that may simply not be possible, based on the native methods and properties associated with the object :cry:

Thanks
 

Users who are viewing this thread

Top Bottom