Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-19-2015, 04:18 AM
gmaxey gmaxey is offline Find last word in paragraph and delete it Windows 7 32bit Find last word in paragraph and delete it Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,635
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Here is another approach:



Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
  Do
    Selection.Paragraphs(1).Range.Characters.Last.Previous.Delete
  Loop Until Selection.Paragraphs(1).Range.Characters.Last.Previous _
       Like "[" & Chr(32) & "," & Chr(160) & "," & Chr(9) & "]"
       'Space, non-breaking space or tab.
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



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
Find last word in paragraph and delete it 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 02:42 AM.


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