Results 1 to 5 of 5
  1. #1
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    vbCr vs. ^p (Word 2002 SP-2)

    As part of a Find.Text string, vbCr (or, alternatively, Chr$(13)) seems to be equivalent to "^p". But if I use vbCr in a Find.Replacement.Text string, the resulting "paragraph marks" don't behave like independent paragraphs. (Ditto if I use Chr$(13) or, for that matter, vbCrLf.)

    Can anyone explain the subtle distinction (at least for replacement purposes) between vbCr and a full-fledged "paragraph mark"?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: vbCr vs. ^p (Word 2002 SP-2)

    A Word paragraph mark is supposed to be a vbCrLf -- Chr(13) & Chr(10). I think you are better off replacing with ^p than with the vb constants unless you are trying to achieve a particular effect.

  3. #3
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: vbCr vs. ^p (Word 2002 SP-2)

    Supposed to be perhaps, but I've noted that Word finds ordinary paragraph marks if Find.Text is vbCr and doesn't find them if Find.Text is vbCrLf.

    Based on today's experience, I definitely agree that ^p is the way to go if you want an ordinary paragraph mark.

    If you put a vbCr in Find.Replacement.Text, it ends up as a "paragraph mark" (to judge by its onscreen representation) that behaves more like a soft return (in that it moves to a new line but keeps you within the same paragraph). I wondered if anyone had any insight into the nature of these, or dangers, or (who knows?) maybe even some unique use for them in the right circumstances.

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,853
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: vbCr vs. ^p (Word 2002 SP-2)

    One of the unique uses for the pseudo Returns is when doing wildcard search and replaces. You are not allowed to include ^p in the wildcards but replacing it with ^13 does the same thing. Then when you have finished your wildcard task, turn off wildcards and replace ^13 with ^p to tidy the file again.

    I don't use them for anything else but maybe they have another use.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: vbCr vs. ^p (Word 2002 SP-2)

    Hi Andrew:
    Although you can't find ^p using wildcards, you can use ^p in the replace box with wildcards. So you can save a step in Find/Replace by using wildcards &
    Find: ^13 & whatever other expression you're using
    Replace: whatever you want plus ^p

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •