![]() |
Determining Selected Mail Items
If I want to use VBA to get the count and text of selected items within the current folder, what would be some syntax possibilities?
For example, the user selects items 1, 7, 12, 17, 21, 23-29, and 35, in preparation to take an action on those items (i.e. delete, move, etc.), how would I get the count, and the text to those items, if I wanted to save the count and text in a couple of variables for future use? -- Thanks, Dennis |
Determining Selected Mail Items
Application.ActiveExplorer.Selection is the collection of all selected items. Selection.Count gives you the count. Iterate the collection to return each item in turn. If you plan to move or delete, use a countdown For ... Next loop.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "DENNIS BROWN" wrote in message . .. If I want to use VBA to get the count and text of selected items within the current folder, what would be some syntax possibilities? For example, the user selects items 1, 7, 12, 17, 21, 23-29, and 35, in preparation to take an action on those items (i.e. delete, move, etc.), how would I get the count, and the text to those items, if I wanted to save the count and text in a couple of variables for future use? -- Thanks, Dennis |
Determining Selected Mail Items
Works great! Thanks.
-- Thanks, Dennis "Sue Mosher [MVP-Outlook]" wrote in message ... Application.ActiveExplorer.Selection is the collection of all selected items. Selection.Count gives you the count. Iterate the collection to return each item in turn. If you plan to move or delete, use a countdown For ... Next loop. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "DENNIS BROWN" wrote in message . .. If I want to use VBA to get the count and text of selected items within the current folder, what would be some syntax possibilities? For example, the user selects items 1, 7, 12, 17, 21, 23-29, and 35, in preparation to take an action on those items (i.e. delete, move, etc.), how would I get the count, and the text to those items, if I wanted to save the count and text in a couple of variables for future use? -- Thanks, Dennis |
All times are GMT +1. The time now is 05:59 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-2006 OutlookBanter.com