bruderbell
Active Member
- Joined
- Aug 29, 2006
- Messages
- 374
Hi all,
I'm trying to code a little macro to check each word of a document to see if the first 2 characters are capitals, and then perform a function if so. I think I want to use a for each statement, but I can't figure out how to do so exactly.
dim x as (word, but it won't let me use this since word is defined as the application and not an object type)
for each x in words
if first letter is caps and second letter is caps
then
do my code
end if
next
end sub
Can anyone help me fill in the gaps?
I'm trying to code a little macro to check each word of a document to see if the first 2 characters are capitals, and then perform a function if so. I think I want to use a for each statement, but I can't figure out how to do so exactly.
dim x as (word, but it won't let me use this since word is defined as the application and not an object type)
for each x in words
if first letter is caps and second letter is caps
then
do my code
end if
next
end sub
Can anyone help me fill in the gaps?