Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-01-2013, 04:03 AM
Adriano Adriano is offline Find Replace Windows 7 64bit Find Replace Office 2010 32bit
Novice
Find Replace
 
Join Date: Feb 2013
Posts: 10
Adriano is on a distinguished road
Default

Paul,

Thanks a lot!

I've managed to solve the puzzle with your help.



The code is:


Code:
Sub remove_tables()

Application.ScreenUpdating = False
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "([a-z]\))"
    .Style = "table-1"
    .Replacement.Text = ""
    .Format = bSty
    .Forward = True
    .Wrap = wdFindStop
    .MatchCase = True
    .MatchWholeWord = True
    .MatchWildcards = True
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute
  End With
  Do While .Find.Found
    If .Information(wdWithInTable) = True Then
      .Duplicate.Tables(1).ConvertToText Separator:=vbTab
    End If
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
End With
Exit Sub
errExit:
Beep
Application.ScreenUpdating = True
End Sub

Last edited by macropod; 02-08-2021 at 10:44 PM. Reason: Added code tags
Reply With Quote
Reply

Tags
find, replace, tables



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Find/Replace or VBA davidku Word 4 04-27-2012 04:39 PM
Find Replace Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM
Find Replace Is there a way to use "find/replace" to find italics words? slayda Word 3 09-14-2011 02:16 PM
Find Replace Find and Replace kjxavier Excel 3 08-12-2011 10:49 PM
Find Replace Help with find and replace or query and replace shabbaranks Excel 4 03-19-2011 08:38 AM

Other Forums: Access Forums

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