![]() |
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
|
|||
|
|||
![]()
Hi,
I want to filter the Tasks home page based on some input criteria like From This Start Date to That Date. I found a way that by using Restrict() Method in OlTaskItem Object,we can filter the data and it does. But the problem for me is that i can't able to place the Filtered collection Object in the Tasks Home page. Either i can able to Open all the Filtered Tasks using Display Method or i can use Delete Method to delete the he collection object and something else i can do. But my requirement is to just show only the filtered Task in the TAsks Home PAge. Can anyone help with this? -- Any responce will be really appreciated. |
Ads |
#2
|
|||
|
|||
![]() You can modify the folder's CurrentView property. The easiest way is to create the filter via the wizard. Then read CurrentView.Xml and see how the the filter node has to look like. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook Quick-Cats - The most effective way to assign Outlook categories: http://www.shareit.com/product.html?...4&languageid=1 (German: http://www.VBOffice.net/product.html?pub=6) Am Wed, 14 Mar 2007 23:45:00 -0700 schrieb Charan: Hi, I want to filter the Tasks home page based on some input criteria like From This Start Date to That Date. I found a way that by using Restrict() Method in OlTaskItem Object,we can filter the data and it does. But the problem for me is that i can't able to place the Filtered collection Object in the Tasks Home page. Either i can able to Open all the Filtered Tasks using Display Method or i can use Delete Method to delete the he collection object and something else i can do. But my requirement is to just show only the filtered Task in the TAsks Home PAge. Can anyone help with this? |
#3
|
|||
|
|||
![]()
Hi Bauer,
Thanks for your response.But i need to give the input dynamically,based on the input given by the User,Tasks should be filtered.Further this has be done by my application(my VBA code) and not by the Outlook predefined Tasks filter. Here is my sample code. Const olFolderTasks = 13 Set objOutlook = CreateObject("Outlook.Application") Set objNamespace = objOutlook.GetNamespace("MAPI") Set objFolder = objNamespace.GetDefaultFolder(olFolderTasks) Set objTask = objOutlook.CreateItem(olTaskItem) Set colItems = objFolder.Items strFilter = "[Subject] = 'qwe'" Set coltasks = colItems.Restrict(strFilter) For Each objTask In coltasks objTask.Display Next Here instead of "objTask.Display" ,i need some other thing that should show only the filtered Tasks.Since "objTask.Display" will "open" all the filtered Tasks. I don't want to open the Tasks but to show the Tasks. -- Thanks in advance. "Michael Bauer [MVP - Outlook]" wrote: You can modify the folder's CurrentView property. The easiest way is to create the filter via the wizard. Then read CurrentView.Xml and see how the the filter node has to look like. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook Quick-Cats - The most effective way to assign Outlook categories: http://www.shareit.com/product.html?...4&languageid=1 (German: http://www.VBOffice.net/product.html?pub=6) Am Wed, 14 Mar 2007 23:45:00 -0700 schrieb Charan: Hi, I want to filter the Tasks home page based on some input criteria like From This Start Date to That Date. I found a way that by using Restrict() Method in OlTaskItem Object,we can filter the data and it does. But the problem for me is that i can't able to place the Filtered collection Object in the Tasks Home page. Either i can able to Open all the Filtered Tasks using Display Method or i can use Delete Method to delete the he collection object and something else i can do. But my requirement is to just show only the filtered Task in the TAsks Home PAge. Can anyone help with this? |
#4
|
|||
|
|||
![]() You have two options: 1) The Restrict method returns a filtered Items collection. With a UserForm and a Listbox on it you can display the items. 2) Modifiy the CurrentView.Xml property. Outlook will show the result directly itself. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook Quick-Cats - The most effective way to assign Outlook categories: http://www.shareit.com/product.html?...4&languageid=1 (German: http://www.VBOffice.net/product.html?pub=6) Am Thu, 15 Mar 2007 22:33:00 -0700 schrieb Charan: Hi Bauer, Thanks for your response.But i need to give the input dynamically,based on the input given by the User,Tasks should be filtered.Further this has be done by my application(my VBA code) and not by the Outlook predefined Tasks filter. Here is my sample code. Const olFolderTasks = 13 Set objOutlook = CreateObject("Outlook.Application") Set objNamespace = objOutlook.GetNamespace("MAPI") Set objFolder = objNamespace.GetDefaultFolder(olFolderTasks) Set objTask = objOutlook.CreateItem(olTaskItem) Set colItems = objFolder.Items strFilter = "[Subject] = 'qwe'" Set coltasks = colItems.Restrict(strFilter) For Each objTask In coltasks objTask.Display Next Here instead of "objTask.Display" ,i need some other thing that should show only the filtered Tasks.Since "objTask.Display" will "open" all the filtered Tasks. I don't want to open the Tasks but to show the Tasks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Home page in Internet Explorer 7 | Katherine | Outlook Express | 2 | November 12th 06 03:59 PM |
User cannot see public folder home page | [email protected] | Outlook - General Queries | 1 | October 14th 06 12:54 AM |
adding hyperlinks to the folder home page | indrajith_varma1 | Outlook - General Queries | 3 | September 27th 06 11:56 PM |
Excel as folder home page in Outlook2003 | tee | Outlook - General Queries | 5 | September 25th 06 01:11 PM |
why does outlook 2003 go to my email home page | jeff1202 | Outlook - Installation | 0 | March 15th 06 12:01 AM |