![]() |
#1
|
|||
|
|||
![]()
Hiya
Is there any way to reverse the order that attachments are reattached to my email? ![]() If olItem.Attachments.Count > 0 Then For i = olItem.Attachments.Count To 1 Step -1 olAtt = olItem.Attachments(i) sName = olAtt.FileName If sName Like "*.pdf" Then sName = Replace(olAtt.FileName, "%20", " ") 'Removes %20 from file names olAtt.SaveAsFile(sPath & sName) cNames.Add(sPath & sName) olAtt.Delete() End If Next i For i = 0 To cNames.Count olItem.Attachments.Add(cNames(i)) Kill(cNames(i)) Next i End If |
#2
|
|||
|
|||
![]()
No worries, figured out another way around my particular issue!
Thanks ![]() |
#3
|
||||
|
||||
![]()
Instead of
Code:
For i = 0 To cNames.Count Code:
For i = cNames.Count to 0 step -1
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#4
|
|||
|
|||
![]()
Thank you very much, that really helps!
|
![]() |
Tags |
collection, reverse |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
outlook vba - setting reference to subfolder, sometimes no folder items in collection | travb81 | Outlook | 3 | 09-23-2020 11:22 PM |
Looping backwards through a 'For Each' collection | ThinAirDesigns | Project | 1 | 05-02-2019 02:16 PM |
Deleting items in folders doesnt send them to deleted items! | marshy365 | Outlook | 0 | 07-29-2016 03:19 AM |
site collection is inaccurate | dbsoccer51 | Misc | 0 | 12-02-2015 03:30 PM |
Outlook 2007 Saved sent items list only holds the last ten items | david.peake | Outlook | 0 | 06-01-2010 07:27 PM |