Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-18-2015, 10:58 PM
Dave T Dave T is offline Find last word in paragraph and delete it Windows 7 64bit Find last word in paragraph and delete it Office 2007
Advanced Beginner
Find last word in paragraph and delete it
 
Join Date: Nov 2014
Location: Australia
Posts: 66
Dave T is on a distinguished road
Default Find last word in paragraph and delete it

Hello All,

I do not know how to do this so I am after some help…

I am after a macro that will:
  • Go to the end of the current paragraph (not line) the cursor is in
  • Find the last space in the paragraph (i.e. go back from the paragraph mark to the first space left)
  • Select the whole last word (including any full stop, etc.) and delete it

For example:


The quick brown fox.
The macro would delete the word fox including the full stop.
I am not fussed if it also deletes the space (leaving 'brown' without any space after it).

Any help appreciated.

Regards,
Dave T
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find last word in paragraph and delete it Why when I paste text into word, blank space appears after a paragraph & I can't delete it? AWD Word 3 10-16-2018 01:10 PM
can't delete paragraph mark at end of document kb Word 10 10-06-2017 02:32 PM
Find last word in paragraph and delete it Delete bookmark and paragraph which is blank dsjk9190 Word VBA 2 01-22-2015 01:15 AM
Find last word in paragraph and delete it Word thinks 1 sentence is 2 paragraphs and won't let me delete the extra paragraph symbol jrasicmark Word 1 12-05-2014 01:50 AM
Find last word in paragraph and delete it Find all email addresses in word document and delete Chayes Word VBA 14 10-22-2013 06:30 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft