Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-15-2020, 03:01 PM
eduzs eduzs is offline Edit a paragraph with a section break Windows 10 Edit a paragraph with a section break Office 2019
Expert
Edit a paragraph with a section break
 
Join Date: May 2017
Posts: 266
eduzs is on a distinguished road
Default

Thanks all! This workaround works well for my need:

Code:
Dim x as long, oDoc as document, sTmp as string

Set oDoc = activedocument

For x = 1 To oDoc.Paragraphs.Count
    sTmp = oDoc.Paragraphs(x).range.Text
    If InStr(sTmp, Chr(12)) > 0 And Len(sTmp) > 2 Then
        oDoc.Paragraphs(x).range.Select
        With Selection
            .Collapse direction:=wdCollapseEnd
            .MoveLeft unit:=wdCharacter, Count:=1
            .TypeText Chr(13) & Chr(13)
        End With
    End If
Next x

Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit a paragraph with a section break Word 2007, cannot insert Section Break (Continuous), only Section Break (Next Page) btse1 Word 3 11-01-2018 09:23 AM
Section Break (Continuous) counted as Section Break (Next page) wolfer Word VBA 2 01-06-2018 09:51 AM
Replacing paragraph formatting before column break also changes the next paragraph after the break jjmartin1340 Word 3 09-21-2015 10:50 PM
Edit a paragraph with a section break Section Break (Next Page) replaces Section Break (Continuous) when deleted Carlabasson Word 2 03-25-2013 10:13 PM
URGENT: Mail 'Merge To New Doc' restarts paragraph numbering at each Section break JamesF Mail Merge 0 07-28-2011 07:26 AM

Other Forums: Access Forums

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