![]() |
|
|
|
#1
|
||||
|
||||
|
Run the loop in reverse so as not to screw up the count Code:
For i = myTrash.Items.Count to 1 step -1
myTrash.Items(i).Delete
Next i
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
| Tags |
| 2013, macro, trash |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Strange macro behavior in 2016
|
Ulodesk | Word VBA | 5 | 04-02-2017 03:34 PM |
Unexpected formatting issue
|
kcvinu | Word | 6 | 03-29-2017 02:26 PM |
unexpected Roman numbering in ToC
|
eNGiNe | Word | 3 | 08-09-2016 11:13 PM |
| Unexpected behavior of actual finish | patrickd123 | Project | 3 | 07-23-2014 01:53 PM |
| Unexpected Server Response | GreenAccord | Project | 0 | 01-31-2006 12:52 PM |