Thread: [Solved] Format text automatically
View Single Post
 
Old 04-22-2013, 03:29 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I did warn you that the last one wouldn't be processed and that other instances between the 'DO(S) VEREADOR(A/ES)' ranges would be merged into them.

To handled 'DA' as well, change:
.Text = "^13DO[S ]{1,2}VEREADOR*^13DO[S ]{1,2}VEREADOR"
to:
.Text = "^13D[AO][S ]{1,2}VEREADOR*^13D[AO][S ]{1,2}VEREADOR"

For the 'freezing' try changing:
.Wrap = wdFindContinue
to:
.Wrap = wdFindStop
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote