Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.newusers
|
|||
|
|||
Macro help
I absolutely love learning how to use wildcard searches, and here's what I'm
trying to do: There are times when I like to skip through certain parts of a document sentence by sentence. So far the following search has yielded great results for sentences ending in a period followed by one or two spaces or a paragraph mark: .[ {1,2}^13] However, nothing I try to do with sentences ending in a question mark or exclamation point seems to work. I tried putting a backslash before them but that didn't work either. What am I doing wrong? Thanks soooooo much for being there. You wonderful people have taught me practically all I know! |
#2
Posted to microsoft.public.word.newusers
|
|||
|
|||
Macro help
Try again, using the expressions
\?[ {1,2}^13] \![ {1,2}^13] or, for everything together, [.\?\!][ {1,2}^13] They work for me. On Sat, 28 Oct 2006 09:38:01 -0700, Island Girl wrote: I absolutely love learning how to use wildcard searches, and here's what I'm trying to do: There are times when I like to skip through certain parts of a document sentence by sentence. So far the following search has yielded great results for sentences ending in a period followed by one or two spaces or a paragraph mark: .[ {1,2}^13] However, nothing I try to do with sentences ending in a question mark or exclamation point seems to work. I tried putting a backslash before them but that didn't work either. What am I doing wrong? Thanks soooooo much for being there. You wonderful people have taught me practically all I know! -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. |
#3
Posted to microsoft.public.word.newusers
|
|||
|
|||
Macro help
Noticing that the subject line mentions "macro", here's a macro that
goes to the next occurrence: Sub NextSent() Dim oRg As Range Set oRg = ActiveDocument.Range _ (Start:=Selection.Range.End, _ End:=ActiveDocument.Range.End) With oRg.Find .ClearFormatting .Text = "[.\?\!][ {1,2}^13]" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True If .Execute Then oRg.Select End If End With End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. On Sat, 28 Oct 2006 13:20:55 -0400, Jay Freedman wrote: Try again, using the expressions \?[ {1,2}^13] \![ {1,2}^13] or, for everything together, [.\?\!][ {1,2}^13] They work for me. On Sat, 28 Oct 2006 09:38:01 -0700, Island Girl wrote: I absolutely love learning how to use wildcard searches, and here's what I'm trying to do: There are times when I like to skip through certain parts of a document sentence by sentence. So far the following search has yielded great results for sentences ending in a period followed by one or two spaces or a paragraph mark: .[ {1,2}^13] However, nothing I try to do with sentences ending in a question mark or exclamation point seems to work. I tried putting a backslash before them but that didn't work either. What am I doing wrong? Thanks soooooo much for being there. You wonderful people have taught me practically all I know! |
#4
Posted to microsoft.public.word.newusers
|
|||
|
|||
Macro help
Thank you, thank you, thank you, Jay! As usual, you just made my life easier
and my work much more exciting! (I know, I know! Most people would laugh if I told them that anything about word processing was exciting!) "Jay Freedman" wrote: Noticing that the subject line mentions "macro", here's a macro that goes to the next occurrence: Sub NextSent() Dim oRg As Range Set oRg = ActiveDocument.Range _ (Start:=Selection.Range.End, _ End:=ActiveDocument.Range.End) With oRg.Find .ClearFormatting .Text = "[.\?\!][ {1,2}^13]" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True If .Execute Then oRg.Select End If End With End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. On Sat, 28 Oct 2006 13:20:55 -0400, Jay Freedman wrote: Try again, using the expressions \?[ {1,2}^13] \![ {1,2}^13] or, for everything together, [.\?\!][ {1,2}^13] They work for me. On Sat, 28 Oct 2006 09:38:01 -0700, Island Girl wrote: I absolutely love learning how to use wildcard searches, and here's what I'm trying to do: There are times when I like to skip through certain parts of a document sentence by sentence. So far the following search has yielded great results for sentences ending in a period followed by one or two spaces or a paragraph mark: .[ {1,2}^13] However, nothing I try to do with sentences ending in a question mark or exclamation point seems to work. I tried putting a backslash before them but that didn't work either. What am I doing wrong? Thanks soooooo much for being there. You wonderful people have taught me practically all I know! |
#5
Posted to microsoft.public.word.newusers
|
|||
|
|||
Macro help
Is it though! And people like Jay make it even better...
"Island Girl" wrote in message ... Thank you, thank you, thank you, Jay! As usual, you just made my life easier and my work much more exciting! (I know, I know! Most people would laugh if I told them that anything about word processing was exciting!) "Jay Freedman" wrote: Noticing that the subject line mentions "macro", here's a macro that goes to the next occurrence: Sub NextSent() Dim oRg As Range Set oRg = ActiveDocument.Range _ (Start:=Selection.Range.End, _ End:=ActiveDocument.Range.End) With oRg.Find .ClearFormatting .Text = "[.\?\!][ {1,2}^13]" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True If .Execute Then oRg.Select End If End With End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. On Sat, 28 Oct 2006 13:20:55 -0400, Jay Freedman wrote: Try again, using the expressions \?[ {1,2}^13] \![ {1,2}^13] or, for everything together, [.\?\!][ {1,2}^13] They work for me. On Sat, 28 Oct 2006 09:38:01 -0700, Island Girl wrote: I absolutely love learning how to use wildcard searches, and here's what I'm trying to do: There are times when I like to skip through certain parts of a document sentence by sentence. So far the following search has yielded great results for sentences ending in a period followed by one or two spaces or a paragraph mark: .[ {1,2}^13] However, nothing I try to do with sentences ending in a question mark or exclamation point seems to work. I tried putting a backslash before them but that didn't work either. What am I doing wrong? Thanks soooooo much for being there. You wonderful people have taught me practically all I know! |
#6
Posted to microsoft.public.word.newusers
|
|||
|
|||
Macro help
Couldn't have said it better, Aalaan.
"aalaan" wrote: Is it though! And people like Jay make it even better... "Island Girl" wrote in message ... Thank you, thank you, thank you, Jay! As usual, you just made my life easier and my work much more exciting! (I know, I know! Most people would laugh if I told them that anything about word processing was exciting!) "Jay Freedman" wrote: Noticing that the subject line mentions "macro", here's a macro that goes to the next occurrence: Sub NextSent() Dim oRg As Range Set oRg = ActiveDocument.Range _ (Start:=Selection.Range.End, _ End:=ActiveDocument.Range.End) With oRg.Find .ClearFormatting .Text = "[.\?\!][ {1,2}^13]" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True If .Execute Then oRg.Select End If End With End Sub -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. On Sat, 28 Oct 2006 13:20:55 -0400, Jay Freedman wrote: Try again, using the expressions \?[ {1,2}^13] \![ {1,2}^13] or, for everything together, [.\?\!][ {1,2}^13] They work for me. On Sat, 28 Oct 2006 09:38:01 -0700, Island Girl wrote: I absolutely love learning how to use wildcard searches, and here's what I'm trying to do: There are times when I like to skip through certain parts of a document sentence by sentence. So far the following search has yielded great results for sentences ending in a period followed by one or two spaces or a paragraph mark: .[ {1,2}^13] However, nothing I try to do with sentences ending in a question mark or exclamation point seems to work. I tried putting a backslash before them but that didn't work either. What am I doing wrong? Thanks soooooo much for being there. You wonderful people have taught me practically all I know! |
#7
Posted to microsoft.public.word.newusers
|
|||
|
|||
Macro help
That's what I like to hear G.
"Island Girl" wrote in message Couldn't have said it better, Aalaan. |
#8
Posted to microsoft.public.word.newusers
|
|||
|
|||
Macro help
ok
"Island Girl" wrote in message ... I absolutely love learning how to use wildcard searches, and here's what I'm trying to do: There are times when I like to skip through certain parts of a document sentence by sentence. So far the following search has yielded great results for sentences ending in a period followed by one or two spaces or a paragraph mark: .[ {1,2}^13] However, nothing I try to do with sentences ending in a question mark or exclamation point seems to work. I tried putting a backslash before them but that didn't work either. What am I doing wrong? Thanks soooooo much for being there. You wonderful people have taught me practically all I know! |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Form Generaters in Word | Microsoft Word Help | |||
macro produces error message | Microsoft Word Help | |||
Macro Button Won't Stay on Toolbar | Microsoft Word Help | |||
Possible bug when recording a Word Macro | Microsoft Word Help | |||
2000 to 2002 macro and "Could not open macro storage" | Mailmerge |