Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-28-2018, 04:20 PM
jeffreybrown jeffreybrown is offline Delete first three characters after auto numbering Windows Vista Delete first three characters after auto numbering Office 2007
Expert
Delete first three characters after auto numbering
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default Delete first three characters after auto numbering

I'm saving some outlines from the web which are PDFs. Once I save them in Word and apply a auto numbered outline, I get the following results.



1. 1. Marveled (v. 13a).
2. 2. Realized that Peter and John had been with Jesus (v. 13b).
3. 3. Admitted that a miracle had been performed (vv. 14-16).
4. 4. Threatened Peter and John (vv. 17-22).
a) a. Commanded them not to speak in the name of Jesus (vv. 17-18).
b) b. Peter and John said they could not but speak...(vv. 19-20).
c) c. Let them go after more threats (vv. 21-22).

How can I remove the first three characters after the auto numbering and get the results below?

1. Marveled (v. 13a).
2. Realized that Peter and John had been with Jesus (v. 13b).
3. Admitted that a miracle had been performed (vv. 14-16).
4. Threatened Peter and John (vv. 17-22).
a) Commanded them not to speak in the name of Jesus (vv. 17-18).
b) Peter and John said they could not but speak...(vv. 1920).
c) Let them go after more threats (vv. 21-22).
Reply With Quote
  #2  
Old 07-28-2018, 08:15 PM
gmayor's Avatar
gmayor gmayor is offline Delete first three characters after auto numbering Windows 10 Delete first three characters after auto numbering Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
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 of
Default

Maybe with the macro


Code:
Sub macro1()
Dim orng As Range
Dim opara As Paragraph
    For Each opara In ActiveDocument.Paragraphs
        If opara.Style Like "List*" Then
            Set orng = opara.Range
            orng.Collapse 1
            orng.MoveEndUntil Chr(32)
            orng.End = orng.End + 1
            orng.Text = ""
        End If
    Next opara
lbl_Exit:
    Set opara = Nothing
    Set orng = Nothing
    Exit Sub
End Sub
__________________
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
  #3  
Old 07-29-2018, 05:57 AM
jeffreybrown jeffreybrown is offline Delete first three characters after auto numbering Windows Vista Delete first three characters after auto numbering Office 2007
Expert
Delete first three characters after auto numbering
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default

Thank you Graham. Works great.
Reply With Quote
  #4  
Old 07-29-2018, 04:45 PM
jeffreybrown jeffreybrown is offline Delete first three characters after auto numbering Windows Vista Delete first three characters after auto numbering Office 2007
Expert
Delete first three characters after auto numbering
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default

Hi Graham,

How can I modify this to work on a selected group of paragraphs?
Reply With Quote
  #5  
Old 07-30-2018, 12:40 AM
gmayor's Avatar
gmayor gmayor is offline Delete first three characters after auto numbering Windows 10 Delete first three characters after auto numbering Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
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 of
Default

Set a range to the selection and process the paragraphs in the range e.g.
Code:
Sub Macro2()
Dim oPara As Paragraph
Dim oRng As Range, oSel As Range
    Set oSel = Selection.Range
    For Each oPara In oSel.Paragraphs
        If oPara.Style Like "List*" Then
            Set oRng = oPara.Range
            oRng.Collapse 1
            oRng.MoveEndUntil Chr(32)
            oRng.End = oRng.End + 1
            oRng.Text = ""
        End If
    Next oPara
lbl_Exit:
    Set oPara = Nothing
    Set oRng = Nothing
    Set oSel = Nothing
    Exit Sub
End Sub
__________________
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
  #6  
Old 07-30-2018, 02:55 PM
jeffreybrown jeffreybrown is offline Delete first three characters after auto numbering Windows Vista Delete first three characters after auto numbering Office 2007
Expert
Delete first three characters after auto numbering
 
Join Date: Apr 2016
Posts: 673
jeffreybrown has a spectacular aura aboutjeffreybrown has a spectacular aura about
Default

Thanks again Graham. Works great.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete first three characters after auto numbering Delete certain characters from a line Helend269 Word VBA 5 01-09-2018 12:08 PM
Auto numbering macro desireemm1 Word 1 12-10-2015 07:50 PM
Delete first three characters after auto numbering How do I delete strange characters from a document. Stokkers Word 1 06-12-2013 04:21 AM
Delete first three characters after auto numbering auto page numbering socomfort Word 2 05-28-2012 04:19 PM
Delete first three characters after auto numbering Word VBA: Cannot Edit Range (Delete characters except the first in a table cell) tinfanide Word VBA 3 04-27-2012 09:48 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:18 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft