![]() |
|
#16
|
||||
|
||||
|
With the code I posted, change the With wdDoc … End With block to:
Code:
With wdDoc
.ActiveWindow.View.ShowFieldCodes = True
With .Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "()"
.Replacement.Text = ""
.Forward = True
.Format = False
.Wrap = wdFindContinue
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
.Text = "(^d HYPERLINK"
.Wrap = wdFindStop
.Execute
End With
Do While .Find.Found = True
.MoveEndUntil ")", wdForward
.End = .End + 1
.Delete
.Collapse wdcollpaseend
.Find.Execute
Loop
End With
.ActiveWindow.View.ShowFieldCodes = False
.Close SaveChanges:=True
End With
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#17
|
|||
|
|||
|
Sorry gmayor I had some errors while testing your code and didn't go too far into debug because macropods worked.
Thanks for your help people <3 |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| If a2 is not empty, color empty cells in b2:af2 | turkanet | Excel | 2 | 08-20-2017 11:00 PM |
find and delet all text within brackets and the brackets themselves
|
wrdy | Word | 2 | 08-03-2017 06:55 PM |
| Apparently empty (blank) cells aren't empty | daymaker | Excel | 3 | 03-08-2012 03:41 PM |
| brackets citation | uncung | Word | 1 | 07-13-2011 01:39 PM |
| Brackets Issue... | DarkJudge1 | Outlook | 0 | 07-06-2010 05:15 PM |