![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hey,
I want outlook to start up my Search Folder named "For Follow Up" showing up as the default view. I am truly a beginner and am trying to hack this together. The code below will switch the view to "standard" folders underneath the Inbox, but not to a Search Folder. Does any one have any ideas on how to change my view to a Search Folder named "For Follow Up"? Thanks for any help, Luke Dim myolApp As Outlook.Application Dim myNamespace As Outlook.NameSpace Set myolApp = CreateObject("Outlook.Application") Set myNamespace = myolApp.GetNamespace("MAPI") Set myFolder = _ myNamespace.GetDefaultFolder(olFolderInbox) Set myolApp.ActiveExplorer.CurrentFolder = _ myFolder.Folders("For Follow Up") |
Ads |
#2
|
|||
|
|||
![]()
The Search Folders hierarchy is hidden in the default mailbox's Folders
collection so you can't retrieve any by name AFAIK. You can use the GetEntryIDForCurrentFolder macro below to retrieve the id for your Search Folder and use that value in this SetSearchFolderAsCurrent macro: Sub SetSearchFolderAsCurrent() Dim objNS As Outlook.NameSpace Dim objFolder As Outlook.MAPIFolder Set objNS = Application.Session Set objFolder = objNS.GetFolderFromID("0000000038F2773A1C598D49882 D14EC0C5C40C301003782A90F9FC7524AA3B8E8C77AB3BE960 00002D28F400000") Set Application.ActiveExplorer.CurrentFolder = objFolder Set objNS = Nothing Set objFolder = Nothing End Sub Sub GetEntryIDForCurrentFolder() Debug.Print Application.ActiveExplorer.CurrentFolder.EntryID End Sub -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Luke242" wrote: Hey, I want outlook to start up my Search Folder named "For Follow Up" showing up as the default view. I am truly a beginner and am trying to hack this together. The code below will switch the view to "standard" folders underneath the Inbox, but not to a Search Folder. Does any one have any ideas on how to change my view to a Search Folder named "For Follow Up"? Thanks for any help, Luke Dim myolApp As Outlook.Application Dim myNamespace As Outlook.NameSpace Set myolApp = CreateObject("Outlook.Application") Set myNamespace = myolApp.GetNamespace("MAPI") Set myFolder = _ myNamespace.GetDefaultFolder(olFolderInbox) Set myolApp.ActiveExplorer.CurrentFolder = _ myFolder.Folders("For Follow Up") |
#3
|
|||
|
|||
![]()
Thanks. That works great. It took me a second to figure out how to use
debug.print and modify the code, but I learned something new. As I said, true beginner... :-) Luke "Eric Legault [MVP - Outlook]" wrote: The Search Folders hierarchy is hidden in the default mailbox's Folders collection so you can't retrieve any by name AFAIK. You can use the GetEntryIDForCurrentFolder macro below to retrieve the id for your Search Folder and use that value in this SetSearchFolderAsCurrent macro: Sub SetSearchFolderAsCurrent() Dim objNS As Outlook.NameSpace Dim objFolder As Outlook.MAPIFolder Set objNS = Application.Session Set objFolder = objNS.GetFolderFromID("0000000038F2773A1C598D49882 D14EC0C5C40C301003782A90F9FC7524AA3B8E8C77AB3BE960 00002D28F400000") Set Application.ActiveExplorer.CurrentFolder = objFolder Set objNS = Nothing Set objFolder = Nothing End Sub Sub GetEntryIDForCurrentFolder() Debug.Print Application.ActiveExplorer.CurrentFolder.EntryID End Sub -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Luke242" wrote: Hey, I want outlook to start up my Search Folder named "For Follow Up" showing up as the default view. I am truly a beginner and am trying to hack this together. The code below will switch the view to "standard" folders underneath the Inbox, but not to a Search Folder. Does any one have any ideas on how to change my view to a Search Folder named "For Follow Up"? Thanks for any help, Luke Dim myolApp As Outlook.Application Dim myNamespace As Outlook.NameSpace Set myolApp = CreateObject("Outlook.Application") Set myNamespace = myolApp.GetNamespace("MAPI") Set myFolder = _ myNamespace.GetDefaultFolder(olFolderInbox) Set myolApp.ActiveExplorer.CurrentFolder = _ myFolder.Folders("For Follow Up") |
#4
|
|||
|
|||
![]()
Am Mon, 23 Oct 2006 23:03:02 -0700 schrieb Luke242:
Why don“t you simply use the options dialog and chose the folder you want to start with? -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- Hey, I want outlook to start up my Search Folder named "For Follow Up" showing up as the default view. I am truly a beginner and am trying to hack this together. The code below will switch the view to "standard" folders underneath the Inbox, but not to a Search Folder. Does any one have any ideas on how to change my view to a Search Folder named "For Follow Up"? Thanks for any help, Luke Dim myolApp As Outlook.Application Dim myNamespace As Outlook.NameSpace Set myolApp = CreateObject("Outlook.Application") Set myNamespace = myolApp.GetNamespace("MAPI") Set myFolder = _ myNamespace.GetDefaultFolder(olFolderInbox) Set myolApp.ActiveExplorer.CurrentFolder = _ myFolder.Folders("For Follow Up") |
#5
|
|||
|
|||
![]()
Hhhmmm.... That takes all the fun out of it.
Seriously though, I searched the Outlook help file and Google for that option and could not find it. After your suggestion, I was able to find it and got my program all dialed in. Oh well... Luke "Michael Bauer [MVP - Outlook]" wrote: Am Mon, 23 Oct 2006 23:03:02 -0700 schrieb Luke242: Why donĀ“t you simply use the options dialog and chose the folder you want to start with? -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- Hey, I want outlook to start up my Search Folder named "For Follow Up" showing up as the default view. I am truly a beginner and am trying to hack this together. The code below will switch the view to "standard" folders underneath the Inbox, but not to a Search Folder. Does any one have any ideas on how to change my view to a Search Folder named "For Follow Up"? Thanks for any help, Luke Dim myolApp As Outlook.Application Dim myNamespace As Outlook.NameSpace Set myolApp = CreateObject("Outlook.Application") Set myNamespace = myolApp.GetNamespace("MAPI") Set myFolder = _ myNamespace.GetDefaultFolder(olFolderInbox) Set myolApp.ActiveExplorer.CurrentFolder = _ myFolder.Folders("For Follow Up") |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Lost "Unread" Search Folder | Beach Runner | Outlook - General Queries | 1 | August 31st 06 03:39 AM |
PST views - Can I hide "Search Folders" and "Deleted Items"? | Rob | Outlook - General Queries | 1 | August 25th 06 08:41 PM |
Globally changing "File As" format for an Outlook Contact Folder | DJS | Outlook - Using Contacts | 2 | July 1st 06 12:32 AM |
Can I start the "Weekly" view on a Sunday | Tantrums | Outlook - Calandaring | 1 | March 23rd 06 08:39 PM |
In Table View can I group by "Date" instead of "Start" | KLM | Outlook - Calandaring | 1 | January 11th 06 05:52 AM |