Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-09-2022, 03:38 PM
Guessed's Avatar
Guessed Guessed is offline Add text to start of new paragraph Windows 10 Add text to start of new paragraph Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,185
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

This will tag any non-heading selected paragraphs
Code:
Sub TagParas()
  Dim aPar As Paragraph
  For Each aPar In Selection.Paragraphs
    If aPar.Range.ParagraphFormat.OutlineLevel = wdOutlineLevelBodyText Then
      aPar.Range.InsertBefore "<np>"
    End If
  Next aPar
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add text to start of new paragraph Insert Text at Start of Each Paragraph JingleBelle Word VBA 5 04-16-2021 07:36 AM
Inserting text from a Userform into a Field in a paragraph in a paragraph in a word document storemaz Word VBA 1 03-13-2020 08:11 AM
How to find all numbers that start with a paragraph? csongi12xme Word 7 07-22-2014 07:55 AM
Justify Paragraph Start position with VBA jeff_kaufman Word VBA 2 11-09-2013 12:15 PM
Add text to start of new paragraph How to force the start of Style Paragraph to be small so that i don't get green under Jamal NUMAN Word 1 07-11-2011 04:58 AM

Other Forums: Access Forums

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