Have outlook open a new window automatically when it starts

  • Thread starter Thread starter Alan
  • Start date Start date
A

Alan

Hi All,

I am using OL2000 SP3.

I would like to have outlook automatically open my calendar in a
separate window whenever outlook is started.

This would be the automagical equivalent of right clicking on the
calendar in the folder list, and selecting 'open in new window'.

I have the following that displays it okay:

application.GetNamespace("MAPI").folders("Alan"). _
folders("Calendar").display


However, once that new explorer object is created and the calendar is
displayed therein, I also want to hide the folders on the left.

Two problems:

1) How to I refer to the explorer object? I cannot seem to use a set
command to assign the explorer object to a variable like this:

Set MyExp = application.GetNamespace("MAPI"). _
folders("Alan").folders("Calendar").display


2) Once I find out how to refer to the explorer object, how to I hide
the folders? Of course, this may be trivial once the first point is
resolved.



Thanks,

Alan.
 
Am Tue, 20 Sep 2005 15:51:00 +1200 schrieb Alan:

1) After displaying a folder you can set your Explorer variable to the
ActiveExplorer.

2) It´s the Explorer´s ShowPane method.
 
Michael Bauer said:
1) After displaying a folder you can set your Explorer variable to the
ActiveExplorer.

2) It´s the Explorer´s ShowPane method.

Hi Michael,

After reading your answer, it all seems so much more obvious - thanx!

I now have the following:

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Sub OpenMyFolderInNewExp()

Dim MyExp As Explorer


Set MyExp =
Application.Explorers.Add(Application.GetNamespace("MAPI").Folders("Al
an"))

MyExp.Display

MyExp.Activate

DoEvents

SendKeys "%v", True
SendKeys "e", True


End Sub

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


I couldn't see a way to use the pane object to hide the folders, so I
used SendKeys.

Am I missing something there?

Thanks,

Alan.
 
Am Tue, 20 Sep 2005 17:42:25 +1200 schrieb Alan:

Alan, ShowPane is not an object. It´s a method directly of an Explorer
object. That is in your sample you just have to type MyExp.s and the
IntelliSense will suggest all methods and properties starting with "s".

In addtition, you can look into the object browser (F2) and browse all
methods etc. In most cases, just select an item you´re interested in and
click F1 for help and code samples.
 
Michael Bauer said:
Am Tue, 20 Sep 2005 17:42:25 +1200 schrieb Alan:

Alan, ShowPane is not an object. It´s a method directly of an
Explorer object. That is in your sample you just have to type
MyExp.s and the IntelliSense will suggest all methods and properties
starting with "s".

In addtition, you can look into the object browser (F2) and browse
all methods etc. In most cases, just select an item you´re
interested in and click F1 for help and code samples.

Hi Michael,

Thank you so much - I cannot for the life of me understand why I
couldn't find that before.

I now have the complete code down tothe following:


With Application.Explorers.Add _
(Application.GetNamespace("MAPI").Folders("Alan"))

.Display
.ShowPane olFolderList, False

End With


I really appreciate your help.

Regards,

Alan.
 
Back
Top