Thread: Checking Gender
View Single Post
 
Old 07-06-2014, 06:10 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
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

If you want to check male & female as well, you'll need to add those expressions to the code. For example, instead of:
StrGen = "<[Hh][Ee]> <[Hh][Ii][MmSs]> <[Hh][Ii][Mm][Ss][Ee][Ll][Ff]>|" & _
"<[Ss][Hh][Ee]> <[Hh][Ee][Rr]> <[Hh][Ee][Rr][Ss]> <[Hh][Ee][Rr][Ss][Ee][Ll][Ff]>"
use:
StrGen = "<[Mm][Aa][Ll][Ee]> <[Hh][Ee]> <[Hh][Ii][MmSs]> <[Hh][Ii][Mm][Ss][Ee][Ll][Ff]>|" & _
"<[Ff][Ee][Mm][Aa][Ll][Ee]> <[Ss][Hh][Ee]> <[Hh][Ee][Rr]> <[Hh][Ee][Rr][Ss]> <[Hh][Ee][Rr][Ss][Ee][Ll][Ff]>"
You can keep adding similar expressions, for man & woman, boy & girl, etc. the same way. Encoding the expresions as I have done means they can be found regardless of what combination of uppercase & lowercase letters they use.

As for buttons, please read what I wrote in post #2. You can't simply add buttons to a macro.

Of course, if you used gender-neutral terms (e.g. patient, client, person), this wouldn't be an issue.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote