Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

For...Next assistance please

Status
Not open for further replies.

pluz

Instructor
Jan 26, 2004
20
0
0
US
Need help with macro, please. I need to search a Word document for all instances of the TA field "^d TA" and if the field contains any alpha character (a-z) followed by a comma, I need to italicize everything to the left of the comma { TA \l Blue Shores, \1 22888, 22999) in each field code. If not, go to next instance of ^d TA.

Can someone please help the greeny?



 
Have you tried the macro recorder ?

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I need to look for a field (^d) called TA. When Word finds this field, the entire field is selected, then I need to first search the selection for any alpha character followed by a comma. If there is an alpha character followed by a comma, then I need to italicize everything inside this field, to the left of the comma(not including the comma). If no alpha+comma, do nothing and find next. Unfortunately, the macro recorder can't do this.

Example:
{ TA \l Testing, 777,998) - Italicize to left of comma
{ TA \l TestingA, 777,998) - Italicize to left of comma
{ TA \s Testing2, 777,999) - Do nothing, find next
{ TA \s Testing3, 777,999) - Do nothing, find next

Appreciate any help with this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top