Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-16-2019, 08:44 AM
gmaxey gmaxey is offline Macro - Press enter when a period is detected Windows 10 Macro - Press enter when a period is detected Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Macros don't press enter.

With a macro, you can change ". " to a period followed by a paragraph:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Range
  Set oRng = ActiveDocument.Range 'or select the text to process and change to Selection.Range
  With oRng.Find
    .Text = ". "
    While .Execute
      oRng.Text = "." & vbCr
      oRng.Collapse wdCollapseEnd
    Wend
  End With
lbl_Exit:
  Exit Sub
End Sub

Now, if after doing that, you want to put it back like it was then what is the point of doing anything in the first place?
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
when press enter, cell value rolls to zero Drywit44 Excel 1 11-21-2018 12:10 AM
Error in macro "Ambiguous name detected" - but why?? Officer_Bierschnitt Excel Programming 7 11-30-2015 03:55 AM
Macro - Press enter when a period is detected Macro Needed to Replace a Period by a Comma rsrasc Word VBA 2 08-23-2015 03:23 PM
text box appears after I press enter/try to write in bullet form topgunitsme Word 1 08-13-2014 03:26 PM
Highlighted text won't delete - when I press enter Gague Word 2 07-09-2010 12:53 PM

Other Forums: Access Forums

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