A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

VB script to expand all the folders? (O2K)



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 30th 07, 04:15 PM posted to microsoft.public.outlook.program_vba
StargateFanFromWork
external usenet poster
 
Posts: 39
Default VB script to expand all the folders? (O2K)

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/micros...dd46f9ca2577c0
http://groups.google.ca/group/micros...olders&rnum=1#
http://groups.google.ca/group/micros...89ab4fd33762d0

D Thanks!


Ads
  #2  
Old July 31st 07, 06:44 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default VB script to expand all the folders? (O2K)




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

--
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/micros...dd46f9ca2577c0

http://groups.google.ca/group/micros...olders&rnum=1#

http://groups.google.ca/group/micros...89ab4fd33762d0

D Thanks!

  #3  
Old August 2nd 07, 05:06 PM posted to microsoft.public.outlook.program_vba
StargateFanFromWork
external usenet poster
 
Posts: 39
Default VB script to expand all the folders? (O2K)

"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!



  #4  
Old August 2nd 07, 05:25 PM posted to microsoft.public.outlook.program_vba
StargateFanFromWork
external usenet poster
 
Posts: 39
Default VB script to expand all the folders? (O2K)

(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!





  #5  
Old August 2nd 07, 06:19 PM posted to microsoft.public.outlook.program_vba
StargateFanFromWork
external usenet poster
 
Posts: 39
Default VB script to expand all the folders? (O2K)

"StargateFanFromWork" wrote in message
...
(That should be "pain" and not "pane", btw ...)

Is there any way to limit the macro? It's still going 5 mins later. It


Like the Energizer Bunny, it keeps going and going ... the Public Folder
section is HUGE. It's still expanding them all this time later ... g

Any hope for just expanding the section that I use, under "Outlook Today"?
g

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!







  #6  
Old August 3rd 07, 06:11 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default VB script to expand all the folders? (O2K)


It's upated:
http://www.vboffice.net/sample.html?...owitem&pub= 6

--
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 Thu, 2 Aug 2007 13:19:05 -0400 schrieb StargateFanFromWork:

"StargateFanFromWork" wrote in message
...
(That should be "pain" and not "pane", btw ...)

Is there any way to limit the macro? It's still going 5 mins later. It


Like the Energizer Bunny, it keeps going and going ... the Public Folder
section is HUGE. It's still expanding them all this time later ... g

Any hope for just expanding the section that I use, under "Outlook Today"?
g

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!




  #7  
Old August 3rd 07, 04:04 PM posted to microsoft.public.outlook.program_vba
StargateFanFromWork
external usenet poster
 
Posts: 39
Default VB script to expand all the folders? (O2K)

"Michael Bauer [MVP - Outlook]" wrote in message
...

It's upated:
http://www.vboffice.net/sample.html?...owitem&pub= 6


That was incredible yesterday g. Oh, it took a second or so only to
expand my folders under "Outlook Today" but it kept running for about
another hour after this Energizer Bunny message I posted g. Now _that_
part _was_ funny, as initially predicted. I was just amazed how long it
took Outlook to go before crashing, because eventually it did g.

So very kewl that you updated this. That will be neat.

I did get an error though on enabling the macros on O2K startup. The error
message is this:
Ambiguous name detected: Application_Setup

While the text selected is the macro name part:
Private Sub Application_Startup selected

So I couldn't check it out to see what this neat little macro would do.
Crossing fingers Hope it's something easy to fix.

Cheers and thanks!!

D

--
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 Thu, 2 Aug 2007 13:19:05 -0400 schrieb StargateFanFromWork:

"StargateFanFromWork" wrote in message
...
(That should be "pain" and not "pane", btw ...)

Is there any way to limit the macro? It's still going 5 mins later. It


Like the Energizer Bunny, it keeps going and going ... the Public Folder
section is HUGE. It's still expanding them all this time later ... g

Any hope for just expanding the section that I use, under "Outlook
Today"?
g

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!






  #8  
Old August 4th 07, 02:58 PM posted to microsoft.public.outlook.program_vba
StargateFan
external usenet poster
 
Posts: 48
Default VB script to expand all the folders? (O2K)

On Fri, 3 Aug 2007 11:04:44 -0400, "StargateFanFromWork"
wrote:

"Michael Bauer [MVP - Outlook]" wrote in message
.. .

It's upated:
http://www.vboffice.net/sample.html?...owitem&pub= 6


That was incredible yesterday g. Oh, it took a second or so only to
expand my folders under "Outlook Today" but it kept running for about
another hour after this Energizer Bunny message I posted g. Now _that_
part _was_ funny, as initially predicted. I was just amazed how long it
took Outlook to go before crashing, because eventually it did g.

So very kewl that you updated this. That will be neat.

I did get an error though on enabling the macros on O2K startup. The error
message is this:
Ambiguous name detected: Application_Setup

While the text selected is the macro name part:
Private Sub Application_Startup selected

So I couldn't check it out to see what this neat little macro would do.
Crossing fingers Hope it's something easy to fix.

Cheers and thanks!!

D


Does anyone know what might be causing this "Ambiguous Name Detected"
error and how to fix it?

Thanks! D

  #9  
Old August 5th 07, 07:32 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default VB script to expand all the folders? (O2K)



The error message tells you what to do: There're two methods with the same
name and that's not allowed. So, search your code for that and rename one of
it.

--
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 Sat, 04 Aug 2007 09:58:21 -0400 schrieb StargateFan:

On Fri, 3 Aug 2007 11:04:44 -0400, "StargateFanFromWork"
wrote:

"Michael Bauer [MVP - Outlook]" wrote in message
. ..

It's upated:

http://www.vboffice.net/sample.html?...owitem&pub= 6

That was incredible yesterday g. Oh, it took a second or so only to
expand my folders under "Outlook Today" but it kept running for about
another hour after this Energizer Bunny message I posted g. Now _that_
part _was_ funny, as initially predicted. I was just amazed how long it
took Outlook to go before crashing, because eventually it did g.

So very kewl that you updated this. That will be neat.

I did get an error though on enabling the macros on O2K startup. The

error
message is this:
Ambiguous name detected: Application_Setup

While the text selected is the macro name part:
Private Sub Application_Startup selected

So I couldn't check it out to see what this neat little macro would do.
Crossing fingers Hope it's something easy to fix.

Cheers and thanks!!

D


Does anyone know what might be causing this "Ambiguous Name Detected"
error and how to fix it?

Thanks! D

  #10  
Old August 7th 07, 03:26 PM posted to microsoft.public.outlook.program_vba
StargateFanFromWork
external usenet poster
 
Posts: 39
Default VB script to expand all the folders? (O2K)

"Michael Bauer [MVP - Outlook]" wrote in message
.. .


The error message tells you what to do: There're two methods with the same
name and that's not allowed. So, search your code for that and rename one
of
it.


Ah, thank you for the education. Sure enough, I don't know how it happened,
maybe a slip-click or something, but I had 3 lines of code bunched up
underneath a macro so there was no separation, that had first bit of the
macro:
Private Sub Application_Startup()
ExpandAllFolders
End Sub

I double-checked all the code and everything works well now. This is
actually pretty unbelievable. All these years of using Outlook and I'll now
be able to stop the deadly dull routine of expanding all my folders. Very
kewl.

Thanks. D

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 Sat, 04 Aug 2007 09:58:21 -0400 schrieb StargateFan:

On Fri, 3 Aug 2007 11:04:44 -0400, "StargateFanFromWork"
wrote:

"Michael Bauer [MVP - Outlook]" wrote in message
.. .

It's upated:

http://www.vboffice.net/sample.html?...owitem&pub= 6

That was incredible yesterday g. Oh, it took a second or so only to
expand my folders under "Outlook Today" but it kept running for about
another hour after this Energizer Bunny message I posted g. Now _that_
part _was_ funny, as initially predicted. I was just amazed how long it
took Outlook to go before crashing, because eventually it did g.

So very kewl that you updated this. That will be neat.

I did get an error though on enabling the macros on O2K startup. The

error
message is this:
Ambiguous name detected: Application_Setup

While the text selected is the macro name part:
Private Sub Application_Startup selected

So I couldn't check it out to see what this neat little macro would do.
Crossing fingers Hope it's something easy to fix.

Cheers and thanks!!

D


Does anyone know what might be causing this "Ambiguous Name Detected"
error and how to fix it?

Thanks! D



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
automatically expand mailbox folders... GO Outlook Express 6 April 3rd 07 05:22 AM
Expand IMAP folders on startup nguser Outlook - General Queries 1 January 9th 07 06:43 PM
? Don't Expand Folders with Messages Marked as Read by Rules Alec S. Outlook Express 2 November 20th 06 05:06 PM
unable to expand folders Japhy Outlook - General Queries 0 August 7th 06 03:59 AM
Unable to expand folders Kent Smith Outlook - Installation 0 February 9th 06 04:34 PM


All times are GMT +1. The time now is 04:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.