How do I get the items in a collapsed group?

Status
Not open for further replies.

J. Farro

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Exchange Server
Posted this question elsewhere but never got a response:
What code allows me to get the email items when the selection is on a header of a collapsed group?
So for example if the explorer window looks like this:
1082952


Or if it looks like this when some groups are collapsed:
1082953


What code allows me to get all the items for the highlighted selection?
 

J. Farro

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Exchange Server
The ony property for selected items is Explorer.Selection. If you select the group header, Selection.Count is 0. So, no way.
Michael,
This confirms what I saw. Is there a way by code to expand a group and then select the items in the collapsed group?
This would be similar to what MS is doing when you select a collapsed header and then click delete: It tells you that the action will be applied to all items in selected group, and then expands, selects all in group and deletes them.
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Frankly, there´s a new function, which I´d overseen. See Explorer.Selection.GetSelection. Unfortunately, this only works for the ConversationView (at least on my pretty old version of OL 2016). If a conversation header is selected, GetSelection(1) returns the new ConversationHeader object. See its methods in the object explorer (press f2).
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Using the sample on that page - it looks like either it doesn't get all the items in the conversation (gets only the first) or the code is not right... it doesn't do anything with the new conversational view either - but more importantly, it doesn't crash using that view, so there might be hope.
 

J. Farro

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Exchange Server
Using the sample on that page - it looks like either it doesn't get all the items in the conversation (gets only the first) or the code is not right... it doesn't do anything with the new conversational view either - but more importantly, it doesn't crash using that view, so there might be hope.
I posted on msdn code and debug output. GetSelection(Outlook.OlSelectionContents.olConversationHeaders) only worked for me when parsing threaded conversations, but not grouped emails. Maybe there is another way. There should be. Maybe Microsoft needs to update its API with a new constant:
GetSelection(Outlook.OlSelectionContents.olGroupedHeaders)
Microsoft, are you listening ?????
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Just played with it in ol2010. There it doesn´t work at all. Perhaps that´s why everyone has missed the function since at least 2010 :)
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I tested it using a 'normal' outlook 2016 conversation - view was group by day, conversations grouped within the days - i selected one conversation. I think that scenario is where any sane person would expect it to work. :)
 

J. Farro

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Exchange Server
How does one get this to the attention of Microsoft? How does one report bugs and is there any traction in getting them fixed?
.. cause I found a few more bugs ...
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
For programming bugs, i think opening a support case is best but if you have good repro steps, post in the msdn forums and give me the link - I'll ask the outlook dev mvps to take a look and we'll bring it to the attention of Microsoft. No guarantee it will be fixed though...

For suggestions, they recommend outlook.uservoice.com but I'm not sure if that works as good for programming.
 

J. Farro

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Exchange Server
For programming bugs, i think opening a support case is best but if you have good repro steps, post in the msdn forums and give me the link - I'll ask the outlook dev mvps to take a look and we'll bring it to the attention of Microsoft. No guarantee it will be fixed though...

For suggestions, they recommend outlook.uservoice.com but I'm not sure if that works as good for programming.

Diane,
The link to the MSDN article was provided above. Here it is again for clarity:
Cannot retrieve email items in collapsed groups with GetSelection()

Note- last comment is from a moderator that just said something along the lines it can't be done. Well, we can see that - but it needs to work, hence it is a bug.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I'm not sure if it should be a bug (or just a stupid name for what it really does) but we'll see what the other devs say.


Sent from my iPhone using Tapatalk
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
F Wishlist Outlook suddenly began synchronizing deleted items every time I delete a single email. Using Outlook 2
D Autosort macro for items in a view Outlook VBA and Custom Forms 2
J Names in sent items suddenly show as Bob Smith (bobsmith@sample.com) Using Outlook 3
M Messages Intermittently Dont Arrive In Sent Items After Sending Successfully Using Outlook 4
D Outlook 2016 Outlook not saving Sent Items Using Outlook 4
G Retention Policy for Outlook.com Deleted Items folder Using Outlook 0
M Outlook on 3 Computers Shows Different Total Items on Same Account Using Outlook 3
B oContacts.Items.Restrict Misses Some Contacts Outlook VBA and Custom Forms 3
T Changing Sent Items location in Outlook 2019 Using Outlook 0
K Use VBA to find Sender and Recipient from Microsfot 365 Journaled Email Items Outlook VBA and Custom Forms 3
A Connect to server to views items Using Outlook 0
D Mail in Sent Items Gone Using Outlook 12
R How to get the Items object of the default mailbox of a specific account in a multiple account Outlook? Outlook VBA and Custom Forms 0
A Cannot copy this folder because it may contain private items Using Outlook 0
GregS Outlook 2016 Sent Mail absent from Sent Mail or Sent Items Folders Using Outlook 4
C How to use VBA to show only items x days old or more Outlook VBA and Custom Forms 1
T Increasing the number of items that appear on the Categories list Using Outlook 2
T How can you include Junk Email in Search Results like you can include Deleted Items? Using Outlook 3
King Mustard Sort search groups by amount of items? Using Outlook 1
J Sent Items Folder NOT Showing Correct From Email Address Using Outlook 0
C Pull Outlook shared calendars items from Excel Outlook VBA and Custom Forms 4
J Outlook Reply > From > Other Email Address... > Address Not Showing in Sent Items... From Email Outlook VBA and Custom Forms 0
GregS Outlook 2016 Sent Items vs Sent Messages Using Outlook 2
M Sent mail not showing in Sent Items folder; but they can be found with Search Using Outlook 3
A Order of Recent Items in Attach File List Using Outlook 5
W Outlook 2010 some sent items marked unread now (was Ok before) Using Outlook 0
D Unopened message in inbox deleted and not in deleted items Using Outlook 3
T "cannot find the calendar folder for this item" - calendar items stuck in outbox Using Outlook 0
R Exporting recovered Deleted Items outside the Inbox Using Outlook 1
Commodore Folders always closed in move/copy items dialog box Using Outlook 3
O Outlook 365 - Toolbar - Close all items - missing? Using Outlook 3
B Clear Offline Items (Mail Folder) via VBA Outlook VBA and Custom Forms 1
A Move email items based on a list of email addresses Outlook VBA and Custom Forms 40
R Retention periods and Deleted Items Using Outlook 7
V Items missing in Sent folder Using Outlook 10
P Deleted Items - Unable to Iterate All of Items Outlook VBA and Custom Forms 1
P How do I convert outlook “to-do” items to “tasks” Outlook VBA and Custom Forms 1
N Tracking Mail items being moved to folders Outlook VBA and Custom Forms 5
icacream Can't the Deleted Items Folder be self cleaning ? Using Outlook 2
N Selecting multiple calendar items Using Outlook 4
S Display PF contact folder items to select contact to link to appointment Outlook VBA and Custom Forms 1
M Sent Items Folder is Present but Not Displayed Using Outlook 2
B Saving items under a folder Using Outlook 3
M Outlook.com autocomplete list invaded by strange items Using Outlook.com accounts in Outlook 7
O How to display number of items per .pst file Using Outlook 7
S Show Total Number Of Items Not Displaying Using Outlook 9
M How many days are items in Recover Deleted at Outlook.com ? Using Outlook.com accounts in Outlook 4
A Cant See outbox items on a secondary Account Exchange Server Administration 3
S Send email via SMTP - use transport rules to add to senders inbox (then rule to move to sent items Exchange Server Administration 1
J Accessing calendar items for Resource Mailboxes Outlook VBA and Custom Forms 2

Similar threads

Top