# Outlook web access "select all"



## Mike Adams (Dec 17, 2008)

I have to use Outlook web access to remove mail from the mainframe and find no way to do a "select all" that works for for the delete function. When I choose "Select all" it picks the entire page, not the list of messages and this is an illegal choice for delete. Trying the select first, then last while holding shift doesn't work: the intermediate messages remain unchecked.

Is there a way to speed this up: right now I have to manually check every message (60+ pages) in order to delete them.

Thanks


----------



## MisterMe (Dec 17, 2008)

You are trying to use *Outlook Web Access* as though it were a standalone email client. It is not. It is webmail. Webmail client actions are performed through predefined checkboxes, tabs, _etc_. immediately above the message list. Yahoo Mail has a checkbox for select-all. *Outlook Web Access* does not. You will have to manually select your messages one-by-one before you can delete them _en masse_.


----------



## ryanker (May 21, 2009)

This worked in Firefox on a PC -- your mileage may vary.

Once you have the page up, copy-and-paste the following into the address bar:
javascript:var f=document.activeElement.childNodes[1].contentDocument;var c=f.all['MsgID'];var i;for(i=0;i<c.length;i++){c_.click();}

That will check all the checkboxes.  Then you can move/delete/whatever all the messages at once.

Good luck with that._


----------



## Charra (Jul 22, 2009)

Awesome OWA trick, thanks for posting!  You saved me hours of work moving/deleting old messages.  I've passed on the link and your trick to my colleagues at the college where I teach.


----------



## harrysofter (Jul 28, 2010)

ryanker said:


> This worked in Firefox on a PC -- your mileage may vary.
> 
> Once you have the page up, copy-and-paste the following into the address bar:
> javascript:var f=document.activeElement.childNodes[1].contentDocument;var c=f.all['MsgID'];var i;for(i=0;i<c.length;i++){c_.click();}
> ...


_
It is not working in my firefox system.
I am getting an error 
f is undefined.
Please help me.
I have some 19500 emails to delete

Thanks,_


----------



## xchaotic (Oct 11, 2010)

Thanks ryan, that worked like a charm!!!
TO make things even more simple, you can add that bit of JS as a bookmark with a key or use something like SeleniumIDE plugin to execute over and over (in my case I had sth like 40 pages so I automated even further).


----------



## ceashel (Dec 31, 2010)

I couldn't get it to work in Firefox, but it worked just fine in Chrome. Took xchaotic's advice and saved it as a bookmark so I could use it over and over again. Also, make sure to go into your options and make sure it is displaying 100 items instead of the default 25 emails. Makes quick work of an agonizing process. Thanks!


----------



## mmoss1906 (Feb 25, 2011)

I tried this in Safari on my MAC and it worked wonders!


----------



## glnsagar (Jul 19, 2011)

javascript:var c=document.activeElement.childNodes[1].contentDocument.querySelectorAll('input[name="MsgID"]');var i;for(i=0;i<c.length;i++){c_.click();}_


----------



## glnsagar (Jul 19, 2011)

This new script works for firefox and safari on Mac. you may want to add this to your post.

javascript:var c=document.activeElement.childNodes[1].contentDocument.querySelectorAll('input[name="MsgID"]');var i;for(i=0;i<c.length;i++){c_.click();}_


----------



## blah3434 (Aug 15, 2011)

The Firefox trick didn't work for me (have version 5).

A little more involved, but I use Outlook Web through an external email client (K-9 Mail on my android phone) using IMAP. I can select all there and delete emails, which sends them to the trash on the server. Just thought maybe this could help somebody else too.


----------



## jakedibz (Jul 18, 2012)

ryanker said:


> This worked in Firefox on a PC -- your mileage may vary.
> 
> Once you have the page up, copy-and-paste the following into the address bar:
> javascript:var f=document.activeElement.childNodes[1].contentDocument;var c=f.all['MsgID'];var i;for(i=0;i<c.length;i++){c_.click();}
> ...


_

Wow I cannot believe this worked. Thank you so much - you saved me hours of work. I did this in Google Chrome so I can confirm that it works on Chrome but I had to hit refresh after everytime that I used your "trick" _


----------



## gerryb (Feb 16, 2013)

mmoss1906 said:


> I tried this in Safari on my MAC and it worked wonders!



Awesome! only issue is I now have to get them out of the Deleted Folder and this trick seems not to work there.

Thanks!


----------

