View Single Post
 
Old 02-10-2021, 06:58 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You should delete it and the rest of the condition i.e.
Code:
                Else
                    xSelection.Item(i).Save
                End If
if you want it to process all the items. At present it just processes one item and saves all the rest. I suspect I would also want to remove the line
Code:
xSelection.Item(i).Delete
so that if the code does not do what you require, you won't lose the messages.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote