(That should be "pain" and not "pane", btw ...)
Is there any way to limit the macro? It's still going 5 mins later. It
took a second or two to expand my dozens of folders, but it's taking a super
forever to expand all the ones if the Public Folders which aren't mine,
even.
Thanks.
"StargateFanFromWork" wrote in message
...
"Michael Bauer [MVP - Outlook]" wrote in message
.. .
The workaround is to make each folder once the current one. It's quite
funny
and may take some time:
http://www.vboffice.net/sample.html?...owitem&pub= 6
Strange, I didn't find it funny. In actuality, it's amazing how I thought
that it might take something like this. I've written macros in AI
(AutoIt) for years that play our keystrokes, so this behaviour isn't
unfamiliar to me. Thanks for this, this will make life easier. On the
one hand, we need nested folders to make life easier but filing is a pane
because O2K doesn't seem to support a way to have the folders expand on
startup.
But that does leave me with a question, the VB script on that page above
is this:
************************************************** *******
Private Sub Application_Startup()
ExpandAllFolders
End Sub
Private Sub ExpandAllFolders()
On Error Resume Next
Dim F As Outlook.MAPIFolder
Dim Ns As Outlook.NameSpace
Set Ns = Application.GetNamespace("Mapi")
Set F = Application.ActiveExplorer.CurrentFolder
LoopFolders Ns.Folders, True
DoEvents
Set Application.ActiveExplorer.CurrentFolder = F
End Sub
Private Sub LoopFolders(Folders As Outlook.Folders, _
ByVal bRecursive As Boolean _
)
Dim F As Outlook.MAPIFolder
For Each F In Folders
Set Application.ActiveExplorer.CurrentFolder = F
DoEvents
If bRecursive Then
If F.Folders.Count Then
LoopFolders F.Folders, bRecursive
End If
End If
Next
End Sub
************************************************** *******The _only_
drawback is that it expands everything, even what's in the Public
Folders.Is there a way to limit the above to just expand what's in our own
Outlook Today section?Thanks! -- Viele Gruesse / Best regards Michael
Bauer - MVP Outlook Organize eMails:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6
Am Mon, 30 Jul 2007 11:15:28 -0400 schrieb StargateFanFromWork: Has
anyone seen a script to expand all the folders upon Outlook opening?
Every time I start the computer and then open Outlook, I have to expand
all
the folders manually. I've found that the system I use is the best for
me except that it requires me to do this. Was hoping to automate it.
I'd rather do one mouse click to give permission for scripts to work
than to continue expanding as if I have to reboot, I still have to go
back and
expand them once again. Yet having them all as separate folders with
no nesting creates other issues that I won't go into since it's not
strictly necessary to this thread. Was hoping someone knew something
that would
work or could direct me to a URL that has one.
http://groups.google.ca/group/microsoft.public.outlook.program_vba/browse_thread/thread/c26731f42f711884/77dd46f9ca2577c0?lnk=gst&q=expand-folder&rnum=2#77dd46f9ca2577c0
http://groups.google.ca/group/microsoft.public.outlook.program_vba/browse_thread/thread/7aa13ec6a4e16ae2/5199ed3ebaa519ab?lnk=gst&q=expand+folders&rnum=1#
http://groups.google.ca/group/microsoft.public.outlook.program_vba/browse_thread/thread/aa9de2815fd870ad/8689ab4fd33762d0?lnk=gst&q=expand+folders&rnum=5#8 689ab4fd33762d0
D Thanks!