Userform Positioning in Outlook

outlook, vba

Solution

Outlook can have multiple windows - Explorers (where you see the list of messages) and inspectors (where you use the details of a single message).

Both Explorer and Inspector objects expose Width, Height, Left, Top properties. Outlook windows are exposed through

- `Application.ActiveWindow` (either Explorer or Inspector)

- `Application.ActiveExplorer`

- `Application.ActiveInspector`

- `Application.Inspectors/Explorers` collections.

Problem

I've found quite a few tutorials on how to position userforms that you create in Excel: Mr Excel Tom's Tutorials XTreme VB And even this StackOverflow question which uses the same method. The problem is that Outlook appears to use different notation for it's own position - there is no such thing as: ``` Application.Left or Application.Width Application.Top or Application.Height ``` Does anyone know the Outlook equivalent?

Original source