![]() |
#7
|
||||
|
||||
![]()
Aside from the fact you've omitted the 'If strFolder & "" & strFile <> strDocNm Then', which means the macro probably won't run to completion if you store the document containing it in the same folder you want to process, there is nothing inherently wrong with your code. Even so, your Find/Replace part could be greatly streamlined:
Code:
With .Range.Find .ClearFormatting .Replacement.ClearFormatting .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Text = "[" .Replacement.Text = " ~" .Execute Replace:=wdReplaceAll .Text = "]" .Replacement.Text = "~" .Execute Replace:=wdReplaceAll .Text = "~*~" .Replacement.Text = " " .Execute Replace:=wdReplaceAll End With
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
multiple files |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to open Docx files? | mond_bees | Word | 12 | 08-29-2012 03:32 AM |
![]() |
mit | Excel | 1 | 06-14-2011 10:15 AM |
![]() |
bolk | Word | 3 | 05-03-2011 05:46 AM |
![]() |
psrs0810 | Excel | 2 | 10-25-2010 01:49 PM |
Icon for docx files | Jazz43 | Word | 2 | 10-20-2009 08:34 PM |