Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 10-14-2021, 10:41 PM
Guessed's Avatar
Guessed Guessed is offline Using Find & Replace in Word instead of GREP Function in Adobe Indesign Windows 10 Using Find & Replace in Word instead of GREP Function in Adobe Indesign Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,187
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

If your document follows the same pattern as the demo you attached, this code will convert its contents.
Code:
Sub Macro1()
  Dim sText As String, arrText() As String, i As Long, aRng As Range
  With ActiveDocument
    For i = .Paragraphs.Count To 1 Step -1
      Set aRng = .Paragraphs(i).Range
      sText = aRng.Text
      arrText = Split(sText, """")
      If UBound(arrText) > 14 Then
        aRng.Text = arrText(9) & Chr(11) & arrText(3) & Chr(11) & arrText(15) & Chr(11) & arrText(1) & vbCr
      End If
    Next i
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 

Tags
find & replace, find replace;wildcards, word vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Some text are missing while importing into Adobe InDesign Muthukumaran Word 2 07-23-2019 11:30 PM
Using Find & Replace in Word instead of GREP Function in Adobe Indesign Function in a Macro used to Find & Replace koehlerc14 Word VBA 3 02-15-2019 11:59 AM
Using Find & Replace in Word instead of GREP Function in Adobe Indesign Find and Replace function shooting off screen to the left of the document Mattblack Word 1 04-10-2014 03:06 PM
Indesign Table to MS word for Editing Kathy Neal Word Tables 1 01-15-2013 07:56 AM
Using Find & Replace in Word instead of GREP Function in Adobe Indesign Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM

Other Forums: Access Forums

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