How to disable syncing folder views/layouts

Status
Not open for further replies.

JackPollack

Senior Member
Outlook version
Email Account
Exchange Server
Hi,

Running OL on multiple computers. Each computer is running at a totally different resolution. The layout that works for one is horrible for another. The layouts are syncing across Exchange. If I change the layout of several folders so I can read them on one computer I have to change them back on the other. Not only do the actual folder layouts sync, but the layout template also syncs. So currently I have to have a group of uniquely named layouts for each computer and switch back and forth every time I use a different computer. This is a big waste of time and there must be a better way.

Thanks
 

larry

Senior Member
Outlook version
Outlook 2010 64 bit
Email Account
Exchange Server
I can't think of a better way than custom views. It's not the best, unfortunately. The views are stored in the mailbox and roam with it. :(
 

JackPollack

Senior Member
Outlook version
Email Account
Exchange Server
What I have been trying to write is a VBA program that will set the views. I'm having two problems, the code below works on OL2003 when it is offline, but doesn't work on OL2010 when offline (I haven't tried it OL yet with either version as I don't want to mess up things until this is stable and I am working on 2 test machines at the moment).

Also the 'Application.ActiveExplorer.CurrentFolder' is making a mess of my folders by expanding them all. I need a way to set the view of each folder without changing the current folder to every folder in the tree, or a way to progromatically determine whether the folder is expanded or not and then set it back after.

I'm thinking just an icon to run this every time I switch from one outlook to another, but maybe it could be put in an event (which?) to trigger.

Sub SetFolder()

MousePointer = 11

Set TopFolder = Application.GetNamespace("MAPI").Folders.GetLast

GetSubfolders (TopFolder)

Set Application.ActiveExplorer.CurrentFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)

TopFolder = ""

MousePointer = 0

End Sub

Sub GetSubfolders(ByVal objParentFolder)

Set colFolders = objParentFolder.Folders

For Each objfolder In colFolders
Set objsubfolder = objParentFolder.Folders(objfolder.Name)
If objfolder.DefaultItemType = 0 Then

Select Case objsubfolder
Case "Drafts", "Junk E-Mail", "Outbox", "Sent Items" ...

Case Else

Set Application.ActiveExplorer.CurrentFolder = objsubfolder
Application.ActiveExplorer.CurrentView = "HomeView"

End Select

End If
GetSubfolders objsubfolder

Next

End Sub
 

JackPollack

Senior Member
Outlook version
Email Account
Exchange Server
Any help on getting this to work in OL2010 and my other questions would be appreciated (or just a better way to deal with views across multiple computers)

1. 'Application.ActiveExplorer.CurrentFolder' is making a mess of my folders by expanding them all. I need a way to set the view of each folder without changing the current folder to every folder in the tree, or a way to progromatically determine whether the folder is expanded or not and then set it back after.

2. I'm thinking just an icon to run this every time I switch from one outlook to another, but maybe it could be put in an event (which?) to trigger.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
application_startup could be used, but I would probably use a button, so I could choose if I needed it.

i haven't had a chance to test it on other installations and I don't know if you can avoid expanding the folders and remembering the expanded state may not be possible. Someone in the msdn forums could better answer that - Outlook for Developers Forum
 
Status
Not open for further replies.
Top