Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-21-2011, 02:20 AM
macropod's Avatar
macropod macropod is offline Selection doesn't contain the action Windows 7 64bit Selection doesn't contain the action Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Ulodesk,

Without seeing your code it's hard to be sure what the problem is. However, I suspect it has to do with your '.Wrap = ' line (if you have one), which should be set to 'wdFindStop'. Try:


Code:
Sub Demo()
With Selection.Find
  .ClearFormatting
  .Replacement.ClearFormatting
  .Forward = True
  .Wrap = wdFindStop
  .Format = False
  .MatchAllWordForms = False
  .MatchSoundsLike = False
  .MatchWildcards = True
  'Find multiple consecutive paragraph breaks
  .Text = "[^13]{2,}"
  'Replace with a single paragraph break
  .Replacement.Text = "^p"
  .Execute Replace:=wdReplaceAll
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 10-21-2011, 05:59 AM
Ulodesk Ulodesk is offline Selection doesn't contain the action Windows 7 64bit Selection doesn't contain the action Office 2010 64bit
Word 2013 Expert Cert
Selection doesn't contain the action
 
Join Date: Sep 2009
Location: Virginia
Posts: 872
Ulodesk is on a distinguished road
Default Thanks!

Dear Paul,
Right on target, as usual. My thanks once again, and best wishes,

Philip
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Selection doesn't contain the action Calling for an action when typing a character ACA Word VBA 7 06-17-2011 10:28 AM
How to link an action on one slide on a powerpoint with the same action on another slevinmj PowerPoint 0 02-24-2011 05:38 AM
Writing a custom action/rule to check outgoing emails ajm218 Outlook 1 02-12-2011 01:52 PM
Change Action Setting Path gskelton PowerPoint 0 02-27-2010 03:20 PM
Highlighted Selection on Action Settings mos7sad PowerPoint 0 10-12-2009 07:48 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:35 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