Checking the articles

D

Designingsally

Hi

I want macros which can check the apt use of macros. For Example, THE should
not be used before plurals.

Case 1
Cats are walking.
Cats is plurals.
But if the user writes The cats are walking. Macros should highlight the
misused article and a message box shd be displayed saying- misused article.

Case 2
Adding AN before vowels a,e,i,o,u

Can someone direct me how to go abt it. i l be glad if someone comes with a
code or something.

I m a novice in the macro programs. Pls pls pls help me out.
Thanks a ton.


Designingsally
 
D

Doug Robbins - Word MVP

There is nothing grammatically wrong with the sentence "The cats are
walking".

The following code will insert an "n" after an "A" or "a" followed by a
space and a word beginning with a, e, i, o or u

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([a,A]{1}) ([a,e,i o u])"
.Replacement.Text = "\1n \2"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

See the article "Finding and replacing characters using wildcards†at:

http://www.word.mvps.org/FAQs/General/UsingWildcards.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
D

Designingsally

Hi

Thanks the reply.

Is it possible to add AN irrespective when the macro encounters A,E,I,O,U?
If so pls can u pls direct me with the code. I ll be extremely glad.

Btw, I did run the macros that you sent me. But it worked for lower case
letters ie (a,e,i,o,u).

For example,
When I type A apple a day keeps the doctor away. And run the macro.

A changes into An.

But, when I type A Apple a day keeps the doctor away. Notice A in Apple
which is in the upper case. And run the macro no change occurs.

Similarly,

I saw a UFO today.
No change when I run the macro.


Plus, I m looking for a message box, with a replace and accept button.
If the user clicks Replace then, A should be replaced as An.
And when the user clicks Decline then, A should remain as A alone. No
changes shd occur.

--
I believe in Hope.

DesigningSally


Doug Robbins - Word MVP said:
There is nothing grammatically wrong with the sentence "The cats are
walking".

The following code will insert an "n" after an "A" or "a" followed by a
space and a word beginning with a, e, i, o or u

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([a,A]{1}) ([a,e,i o u])"
.Replacement.Text = "\1n \2"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

See the article "Finding and replacing characters using wildcards†at:

http://www.word.mvps.org/FAQs/General/UsingWildcards.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
D

Designingsally

btw it is grammatically better to use

"Cats are walking."

Cats are plural
THE refers to a specific thing.
So its odd to use THE before plural.
While if the sentence were to be this way,

Sally has a cat. The cats were walking on the road. This makes sense better.

Cos CATS refer to Sally's.

Thanks

DesigningSally
--
I believe in Hope.

DesigningSally


Doug Robbins - Word MVP said:
There is nothing grammatically wrong with the sentence "The cats are
walking".

The following code will insert an "n" after an "A" or "a" followed by a
space and a word beginning with a, e, i, o or u

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([a,A]{1}) ([a,e,i o u])"
.Replacement.Text = "\1n \2"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

See the article "Finding and replacing characters using wildcards†at:

http://www.word.mvps.org/FAQs/General/UsingWildcards.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
G

Graham Mayor

It is impossible to create by macro (or any other means) a function that
will apply the correct setting in every possible instance and to take
account of your own grammatical idiosyncracies. If you know the correct
usage, a grammar checker becomes superfluous. If you don't then it can be
more of a hindrance than a help.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Hi

Thanks the reply.

Is it possible to add AN irrespective when the macro encounters
A,E,I,O,U? If so pls can u pls direct me with the code. I ll be
extremely glad.

Btw, I did run the macros that you sent me. But it worked for lower
case letters ie (a,e,i,o,u).

For example,
When I type A apple a day keeps the doctor away. And run the macro.

A changes into An.

But, when I type A Apple a day keeps the doctor away. Notice A in
Apple which is in the upper case. And run the macro no change occurs.

Similarly,

I saw a UFO today.
No change when I run the macro.


Plus, I m looking for a message box, with a replace and accept button.
If the user clicks Replace then, A should be replaced as An.
And when the user clicks Decline then, A should remain as A alone. No
changes shd occur.

There is nothing grammatically wrong with the sentence "The cats are
walking".

The following code will insert an "n" after an "A" or "a" followed
by a space and a word beginning with a, e, i, o or u

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([a,A]{1}) ([a,e,i o u])"
.Replacement.Text = "\1n \2"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

See the article "Finding and replacing characters using wildcards"
at:

http://www.word.mvps.org/FAQs/General/UsingWildcards.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
Designingsally said:
Hi

I want macros which can check the apt use of macros. For Example,
THE should
not be used before plurals.

Case 1
Cats are walking.
Cats is plurals.
But if the user writes The cats are walking. Macros should
highlight the misused article and a message box shd be displayed
saying- misused article.

Case 2
Adding AN before vowels a,e,i,o,u

Can someone direct me how to go abt it. i l be glad if someone
comes with a
code or something.

I m a novice in the macro programs. Pls pls pls help me out.
Thanks a ton.


Designingsally
 
D

Doug Robbins - Word MVP

Use

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([a,A]{1}) ([aeiouAEIOU])"
.Replacement.Text = "\1n \2"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
Designingsally said:
Hi

Thanks the reply.

Is it possible to add AN irrespective when the macro encounters A,E,I,O,U?
If so pls can u pls direct me with the code. I ll be extremely glad.

Btw, I did run the macros that you sent me. But it worked for lower case
letters ie (a,e,i,o,u).

For example,
When I type A apple a day keeps the doctor away. And run the macro.

A changes into An.

But, when I type A Apple a day keeps the doctor away. Notice A in Apple
which is in the upper case. And run the macro no change occurs.

Similarly,

I saw a UFO today.
No change when I run the macro.


Plus, I m looking for a message box, with a replace and accept button.
If the user clicks Replace then, A should be replaced as An.
And when the user clicks Decline then, A should remain as A alone. No
changes shd occur.

--
I believe in Hope.

DesigningSally


Doug Robbins - Word MVP said:
There is nothing grammatically wrong with the sentence "The cats are
walking".

The following code will insert an "n" after an "A" or "a" followed by a
space and a word beginning with a, e, i, o or u

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([a,A]{1}) ([a,e,i o u])"
.Replacement.Text = "\1n \2"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

See the article "Finding and replacing characters using wildcards†at:

http://www.word.mvps.org/FAQs/General/UsingWildcards.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
Designingsally said:
Hi

I want macros which can check the apt use of macros. For Example, THE
should
not be used before plurals.

Case 1
Cats are walking.
Cats is plurals.
But if the user writes The cats are walking. Macros should highlight
the
misused article and a message box shd be displayed saying- misused
article.

Case 2
Adding AN before vowels a,e,i,o,u

Can someone direct me how to go abt it. i l be glad if someone comes
with
a
code or something.

I m a novice in the macro programs. Pls pls pls help me out.
Thanks a ton.


Designingsally
 
D

Doug Robbins - Word MVP

We are going to have to agree to disagree on that point.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
Designingsally said:
btw it is grammatically better to use

"Cats are walking."

Cats are plural
THE refers to a specific thing.
So its odd to use THE before plural.
While if the sentence were to be this way,

Sally has a cat. The cats were walking on the road. This makes sense
better.

Cos CATS refer to Sally's.

Thanks

DesigningSally
--
I believe in Hope.

DesigningSally


Doug Robbins - Word MVP said:
There is nothing grammatically wrong with the sentence "The cats are
walking".

The following code will insert an "n" after an "A" or "a" followed by a
space and a word beginning with a, e, i, o or u

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([a,A]{1}) ([a,e,i o u])"
.Replacement.Text = "\1n \2"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

See the article "Finding and replacing characters using wildcards†at:

http://www.word.mvps.org/FAQs/General/UsingWildcards.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
Designingsally said:
Hi

I want macros which can check the apt use of macros. For Example, THE
should
not be used before plurals.

Case 1
Cats are walking.
Cats is plurals.
But if the user writes The cats are walking. Macros should highlight
the
misused article and a message box shd be displayed saying- misused
article.

Case 2
Adding AN before vowels a,e,i,o,u

Can someone direct me how to go abt it. i l be glad if someone comes
with
a
code or something.

I m a novice in the macro programs. Pls pls pls help me out.
Thanks a ton.


Designingsally
 
D

Designingsally

Thanks Doug Robbins. It worked. And the reply was thundering fast.

It really worked. I would like you to cast your opinion on the post
"Tabulating the errors".

DesigningSally
--
I believe in Hope.

DesigningSally


Doug Robbins - Word MVP said:
Use

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([a,A]{1}) ([aeiouAEIOU])"
.Replacement.Text = "\1n \2"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
Designingsally said:
Hi

Thanks the reply.

Is it possible to add AN irrespective when the macro encounters A,E,I,O,U?
If so pls can u pls direct me with the code. I ll be extremely glad.

Btw, I did run the macros that you sent me. But it worked for lower case
letters ie (a,e,i,o,u).

For example,
When I type A apple a day keeps the doctor away. And run the macro.

A changes into An.

But, when I type A Apple a day keeps the doctor away. Notice A in Apple
which is in the upper case. And run the macro no change occurs.

Similarly,

I saw a UFO today.
No change when I run the macro.


Plus, I m looking for a message box, with a replace and accept button.
If the user clicks Replace then, A should be replaced as An.
And when the user clicks Decline then, A should remain as A alone. No
changes shd occur.

--
I believe in Hope.

DesigningSally


Doug Robbins - Word MVP said:
There is nothing grammatically wrong with the sentence "The cats are
walking".

The following code will insert an "n" after an "A" or "a" followed by a
space and a word beginning with a, e, i, o or u

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([a,A]{1}) ([a,e,i o u])"
.Replacement.Text = "\1n \2"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

See the article "Finding and replacing characters using wildcards†at:

http://www.word.mvps.org/FAQs/General/UsingWildcards.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
Hi

I want macros which can check the apt use of macros. For Example, THE
should
not be used before plurals.

Case 1
Cats are walking.
Cats is plurals.
But if the user writes The cats are walking. Macros should highlight
the
misused article and a message box shd be displayed saying- misused
article.

Case 2
Adding AN before vowels a,e,i,o,u

Can someone direct me how to go abt it. i l be glad if someone comes
with
a
code or something.

I m a novice in the macro programs. Pls pls pls help me out.
Thanks a ton.


Designingsally
 
D

Designingsally

Thanks for casting your opinion. If possible pls cast your opinion on
"Tabulating the errors".


DesigningSally
--
I believe in Hope.

DesigningSally


Graham Mayor said:
It is impossible to create by macro (or any other means) a function that
will apply the correct setting in every possible instance and to take
account of your own grammatical idiosyncracies. If you know the correct
usage, a grammar checker becomes superfluous. If you don't then it can be
more of a hindrance than a help.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Hi

Thanks the reply.

Is it possible to add AN irrespective when the macro encounters
A,E,I,O,U? If so pls can u pls direct me with the code. I ll be
extremely glad.

Btw, I did run the macros that you sent me. But it worked for lower
case letters ie (a,e,i,o,u).

For example,
When I type A apple a day keeps the doctor away. And run the macro.

A changes into An.

But, when I type A Apple a day keeps the doctor away. Notice A in
Apple which is in the upper case. And run the macro no change occurs.

Similarly,

I saw a UFO today.
No change when I run the macro.


Plus, I m looking for a message box, with a replace and accept button.
If the user clicks Replace then, A should be replaced as An.
And when the user clicks Decline then, A should remain as A alone. No
changes shd occur.

There is nothing grammatically wrong with the sentence "The cats are
walking".

The following code will insert an "n" after an "A" or "a" followed
by a space and a word beginning with a, e, i, o or u

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([a,A]{1}) ([a,e,i o u])"
.Replacement.Text = "\1n \2"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

See the article "Finding and replacing characters using wildcards"
at:

http://www.word.mvps.org/FAQs/General/UsingWildcards.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
Hi

I want macros which can check the apt use of macros. For Example,
THE should
not be used before plurals.

Case 1
Cats are walking.
Cats is plurals.
But if the user writes The cats are walking. Macros should
highlight the misused article and a message box shd be displayed
saying- misused article.

Case 2
Adding AN before vowels a,e,i,o,u

Can someone direct me how to go abt it. i l be glad if someone
comes with a
code or something.

I m a novice in the macro programs. Pls pls pls help me out.
Thanks a ton.


Designingsally
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Find and Replace a macro 4
Tabulating the errors. 4
Tables 1
Macros to indicate words like NOTE, TIPS 1
Check Double Spaces 1
Bullet list 0
Formatting the macros. 5
Timers with macros 6

Top