Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-15-2015, 11:23 PM
gmayor's Avatar
gmayor gmayor is offline Inserting Carriage Return Windows 7 64bit Inserting Carriage Return Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,137
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

The original macro does not work, because what you are actually looking for is not what you said you were looking for. The macro looks for paragraphs that start with 'Choice (', whereas now you tell us that the paragraph begins with 'Answer ('.



Code:
For Each oPara In ActiveDocument.Paragraphs
     If oPara.Range.Text Like "Choice (*" Then
          oPara.Style = "Extra Space"
     End If
Next oPara
Then you have added in a completely different set of criteria. with phrases that are in the same paragraph, which the code was never intended to address.
__________________
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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Plain Text Content Control - Losing Styling on Carriage Return kintap Word 0 07-16-2014 12:43 PM
Inserting Carriage Return stop carriage return or enter key in a table Alaska1 Word 1 01-14-2013 08:48 AM
Inserting Carriage Return Coding into a macro a carriage return sinbad Word VBA 6 02-27-2012 03:51 AM
Inserting Carriage Return Paragraph (carriage) return font size revrossreddick Word 2 12-28-2011 01:33 PM
Carriage Return Help UCHelp Word 1 04-04-2010 10:11 PM

Other Forums: Access Forums

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