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!

Word Macro

Status
Not open for further replies.

jdognz

Technical User
Jul 31, 2002
43
0
0
NZ
I am new to macros and am trying to write a macro that checks text.
I need to make it check that each line alternates between
M:
F:
M:
F:

and if one is repeated than it increments so i can flag in a message box.

ie if it goes
M:
M:
then u get message saying 1 error

can anyone point me in the right direction or to a website that would help me write this macro?

thanks
 
The right direction is start recording macros. Have you tried yet?

Try recording a macro that looks for M, then a macro that looks for F. Put them together. You will have to learn about editing in the Visual Basic Editor. Look up Help about message boxes.

What you are wanting is actually easy to do. It is better though if you work on getting there with your own effort. If you get stuck with a specific problem we will certainly try and give help.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top