D
Deckard
As discussed in this earlier thread:
http://groups.google.ca/groups?hl=e...q=Outlook+%22show+in+groups%22&ie=UTF-8&hl=en
there is no simple setting to remove Show in Groups for all Outlook
folders in one go.
I have edited the macro created by Andreas Gammel to recursively dig
through all folders (except ones named Tasks) and to remove Show in
Groups, if found.
After copying and pasting you may have to remove carriage returns
applied by Google Groups on long lines.
If you have troubles running macros goto Tools -> Macros -> Security,
then change to Medium Security, close Outlook, reopen, you can now run
macros.
Credit goes to Andreas for creating the original macro.
Enjoy.
'------------------------------------------------------------------
' GlobalDisableShowInGroups - version 1.1
'
' this macro recursively goes through Inbox and all its subfolders
' and disables the annoying "Show in Groups" in Outlook 2003
' You'll see some Outlook instances popping up, but that's ok
'
' (c) Silly Software, 2004
' v.1.1 by CRU Consultants 040901
Sub GlobalDisableShowInGroups()
Dim ns As NameSpace
Dim Inbox As MAPIFolder, Sent As MAPIFolder, Confirmation As
MAPIFolder
Dim fldr As MAPIFolder, acctCnt As Integer, folderCnt As Integer,
account As MAPIFolder
Set ns = GetNamespace("MAPI")
For Each account In ns.Folders
For Each fldr In account.Folders
TreeDisableShowInGroups fldr
Next
Next
End Sub
Public Sub TreeDisableShowInGroups(oFolder As Outlook.MAPIFolder)
Dim oSubFolder As Outlook.MAPIFolder
Dim oCB As Office.CommandBar
Dim oPop As Office.CommandBarPopup
Dim oCtl As Office.CommandBarControl
Dim objExpl As Outlook.Explorer
Dim bFoundGroups As Boolean
Dim caption As String
'open folder in new outlook instance
oFolder.Display
'find state of "Show in Groups"
'NOTE: For WindowsXP in Dutch language, substitute "View" with
"Beeld",
'"Arrange by" with "Rangschikken op" and "Show in groups" with
"Weergeven in groepen"
Set oCB = Application.ActiveExplorer.CommandBars("Menu Bar")
Set oPop = oCB.Controls("View")
Set oPop = oPop.Controls("Arrange by")
'// Make sure Show in Groups option is available
For Each oCtl In oPop.Controls
caption = LCase(Replace(oCtl.caption, "&", "", 1, -1,
vbTextCompare)) '// Remove the silly ampersands
If InStr(1, caption, "groups", vbTextCompare) > 1 And oFolder.Name
<> "Tasks" Then '// Note: Do not adjust groups for Tasks
bFoundGroups = True
End If
Next
'// if show in groups is not found exit out
If Not bFoundGroups Then
oFolder.GetExplorer.Close
Exit Sub
End If
Set oCtl = oPop.Controls("Show in groups")
st = oCtl.State
'if state is ON than change it by executing it
If (st = -1) Then
oCtl.Execute
End If
'close instance of outlook
oFolder.GetExplorer.Close
'Now recursively call any subfolders
For Each oSubFolder In oFolder.Folders
TreeDisableShowInGroups oSubFolder
Next
'Release objects
Set oSubFolder = Nothing
End Sub
http://groups.google.ca/groups?hl=e...q=Outlook+%22show+in+groups%22&ie=UTF-8&hl=en
there is no simple setting to remove Show in Groups for all Outlook
folders in one go.
I have edited the macro created by Andreas Gammel to recursively dig
through all folders (except ones named Tasks) and to remove Show in
Groups, if found.
After copying and pasting you may have to remove carriage returns
applied by Google Groups on long lines.
If you have troubles running macros goto Tools -> Macros -> Security,
then change to Medium Security, close Outlook, reopen, you can now run
macros.
Credit goes to Andreas for creating the original macro.
Enjoy.
'------------------------------------------------------------------
' GlobalDisableShowInGroups - version 1.1
'
' this macro recursively goes through Inbox and all its subfolders
' and disables the annoying "Show in Groups" in Outlook 2003
' You'll see some Outlook instances popping up, but that's ok
'
' (c) Silly Software, 2004
' v.1.1 by CRU Consultants 040901
Sub GlobalDisableShowInGroups()
Dim ns As NameSpace
Dim Inbox As MAPIFolder, Sent As MAPIFolder, Confirmation As
MAPIFolder
Dim fldr As MAPIFolder, acctCnt As Integer, folderCnt As Integer,
account As MAPIFolder
Set ns = GetNamespace("MAPI")
For Each account In ns.Folders
For Each fldr In account.Folders
TreeDisableShowInGroups fldr
Next
Next
End Sub
Public Sub TreeDisableShowInGroups(oFolder As Outlook.MAPIFolder)
Dim oSubFolder As Outlook.MAPIFolder
Dim oCB As Office.CommandBar
Dim oPop As Office.CommandBarPopup
Dim oCtl As Office.CommandBarControl
Dim objExpl As Outlook.Explorer
Dim bFoundGroups As Boolean
Dim caption As String
'open folder in new outlook instance
oFolder.Display
'find state of "Show in Groups"
'NOTE: For WindowsXP in Dutch language, substitute "View" with
"Beeld",
'"Arrange by" with "Rangschikken op" and "Show in groups" with
"Weergeven in groepen"
Set oCB = Application.ActiveExplorer.CommandBars("Menu Bar")
Set oPop = oCB.Controls("View")
Set oPop = oPop.Controls("Arrange by")
'// Make sure Show in Groups option is available
For Each oCtl In oPop.Controls
caption = LCase(Replace(oCtl.caption, "&", "", 1, -1,
vbTextCompare)) '// Remove the silly ampersands
If InStr(1, caption, "groups", vbTextCompare) > 1 And oFolder.Name
<> "Tasks" Then '// Note: Do not adjust groups for Tasks
bFoundGroups = True
End If
Next
'// if show in groups is not found exit out
If Not bFoundGroups Then
oFolder.GetExplorer.Close
Exit Sub
End If
Set oCtl = oPop.Controls("Show in groups")
st = oCtl.State
'if state is ON than change it by executing it
If (st = -1) Then
oCtl.Execute
End If
'close instance of outlook
oFolder.GetExplorer.Close
'Now recursively call any subfolders
For Each oSubFolder In oFolder.Folders
TreeDisableShowInGroups oSubFolder
Next
'Release objects
Set oSubFolder = Nothing
End Sub