View Single Post
 
Old 06-06-2022, 04:36 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Can you explain exactly what you want the code to do?

As a start, the code you have supplied only works on the first selected paragraph. If you want the code to work on every paragraph and it involves deleting stuff then you should work backwards from the end of the document. The initial lines would then be...
Code:
For e = ActiveDocument.Paragraphs.Count to 1 step -1
Set para = ActiveDocument.Paragraphs(e)
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote