Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Userform Positioning in Outlook

Tags:

vba

outlook

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?

like image 427
Martin KS Avatar asked Feb 07 '26 16:02

Martin KS


1 Answers

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.
like image 92
Dmitry Streblechenko Avatar answered Feb 09 '26 12:02

Dmitry Streblechenko