Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Interop / July 2004

Tip: Looking for answers? Try searching our database.

Opening multiple Outlook 2003 windows

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
loKtite - 28 Jul 2004 18:56 GMT
Greetings,

We have a user who always uses 3 Outlook windows -- Inbox with Navigation Pane enalbed, Calendar with Navigation Pane disabled, and Tasks with Navigation Pane disabled.  He wants to be able to have Outlook open when logging in and automatically remember the size and location of each.  

If you open Outlook to inbox, then right click on calendar and open in new window, configure that window, then close the main Outlook window, then the 2nd, it will remember size/location when you re-open Outlook.  You have to remember to close the main window first everytime however.  This method only works for the main and a 2nd window.

I can open the 3 windows automatically by using the command line syntax.  Example
<<
"C:\Program Files\Microsoft Office\Office11\Outlook.exe" /select outlook:calendar
"C:\Program Files\Microsoft Office\Office11\Outlook.exe" /select outlook:tasks
"C:\Program Files\Microsoft Office\Office11\Outlook.exe" /select outlook:inbox

However, this opens all 3 with the cascaded with the same size and Navigation Pane configuration.

Is there an easy way to meet the end-user's desire?  Is there a not-so-easy way?

Thanks!
Sue Mosher [MVP-Outlook] - 28 Jul 2004 19:55 GMT
Easily accomplished with a little VBA code. Put this procedure in the
built-in ThisOutlookSession module.

Private Sub Application_Startup()
  Dim NS As Outlook.NameSpace
  Dim objFolder As Outlook.MAPIFolder
  Dim objExpl As Outlook.Explorer
  Set NS = Application.GetNamespace("MAPI")

  Set objFolder = NS.GetDefaultFolder(olFolderCalendar)
  Set objExpl = objFolder.GetExplorer
  objExpl.ShowPane olNavigationPane, False
  objExpl.Activate

  Set objFolder = NS.GetDefaultFolder(olFolderTasks)
  Set objExpl = objFolder.GetExplorer
  objExpl.ShowPane olNavigationPane, False
  objExpl.Activate

  Set NS = Nothing
  Set objFolder = Nothing
  Set objExpl = Nothing
End Sub

If you're new to Outlook VBA macros, these web pages should help you get
started:

http://www.winnetmag.com/Articles/Index.cfm?ArticleID=21522&pg=1
http://www.outlookcode.com/d/vb.htm

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Greetings,
>
> We have a user who always uses 3 Outlook windows -- Inbox with Navigation Pane enalbed, Calendar with Navigation Pane disabled, and Tasks with
Navigation Pane disabled.  He wants to be able to have Outlook open when
logging in and automatically remember the size and location of each.

> If you open Outlook to inbox, then right click on calendar and open in new window, configure that window, then close the main Outlook window, then the
2nd, it will remember size/location when you re-open Outlook.  You have to
remember to close the main window first everytime however.  This method only
works for the main and a 2nd window.

> I can open the 3 windows automatically by using the command line syntax.  Example
> <<
> "C:\Program Files\Microsoft Office\Office11\Outlook.exe" /select outlook:calendar
> "C:\Program Files\Microsoft Office\Office11\Outlook.exe" /select
outlook:tasks
> "C:\Program Files\Microsoft Office\Office11\Outlook.exe" /select
outlook:inbox

> However, this opens all 3 with the cascaded with the same size and Navigation Pane configuration.
>
> Is there an easy way to meet the end-user's desire?  Is there a not-so-easy way?
>
> Thanks!
loKtite - 28 Jul 2004 20:30 GMT
Excellent on opening the windows.  Anyone have ideas on remembering size and location of the secondary windows?  Again, thanks for the tip Sue!

> Easily accomplished with a little VBA code. Put this procedure in the
> built-in ThisOutlookSession module.
[quoted text clipped - 56 lines]
> >
> > Thanks!
Sue Mosher [MVP-Outlook] - 28 Jul 2004 21:34 GMT
That's quite a bit more work and I don't think I have time to write it
today. I'll leave it as an exercise for someone else. Basically, you'd need
to declare object variables WithEvents for each of the secondary windows'
Explorer objects and use the Explorer.Close event to record the position and
size, either in the registry or in a text file or somewhere else accessible.
The Application_startup routine would then read that data and adjust the
sizes accordingly.

Signature

Sue Mosher, Outlook MVP
Author of
    Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Excellent on opening the windows.  Anyone have ideas on remembering size and location of the secondary windows?  Again, thanks for the tip Sue!
>
[quoted text clipped - 58 lines]
> > >
> > > Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.