Thread: [Solved] Format text automatically
View Single Post
 
Old 04-15-2013, 06:44 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,375
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

Quote:
Originally Posted by dexter30 View Post
1) When there are 'Obs' and 'Justificativa' in the same paragraph, it only does the formatting for the first one. Then I would need to do find/replace again to format the second one. Is there a way to do it in only one step?
The simplest way of dealing with this is to simply click 'ReplaceAll' again. Finding either or both paragraphs can't be done in one pass - even with a macro, I'd do it in two passes.
Quote:
2) In the attached file PT_BEFORE, the code won´t work for the last 'Obs' (last line of the document). Can you see why?
Basically, it's an issue related to the length of the first paragraph. Try:
Find = (Nş [0-9]{1;8}/[!^13]@)[^13]{1;}([OJ][bu]s[.:ifcatv]{1;13})
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote