Results 1 to 12 of 12
  1. #1
    Star Lounger
    Join Date
    Aug 2001
    Location
    St. Louis, Missouri, USA
    Posts
    67
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Invisible characters (Word 97)

    I have some Word files containing tables. I need to find all the double paragraph marks and replace them as part of a cleanup routine, but Word doesn't find them. Some of them I can't even delete manually with the backspace or delete keys-I have to select a couple of characters and delete them.

    I assume this means there's something in the file between the two characters that I can't see (or something missing from one of them?). But since I can't see it, and Word can't see it, is there another way to find and delete whatever's causing this?

    I'm at my wit's end, but I'll bet someone out there has a great idea. Thanks.

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Cairns, Queensland, Australia
    Posts
    885
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Invisible characters (Word 97)

    Are you asking how to display the hidden characters?

    ctrl+* does this. (i.e. ctrl+shift+8 on my keyboard).

    You can then see just what it is that you are about to delete.
    Granville

  3. #3
    Star Lounger
    Join Date
    Aug 2001
    Location
    St. Louis, Missouri, USA
    Posts
    67
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Invisible characters (Word 97)

    Unfortunately, no.
    Even with hidden characters displayed, whatever's going on here still doesn't show up What you see is two paragraph marks, but if you search for two paragraph marks, Word doesn't find them.

  4. #4
    BAM
    Guest

    Re: Invisible characters (Word 97)

    Could you attach a sample for us?

    I've been beta testing a type of reveal codes add-in and would love to see what it comes up with.
    ~~~~~~~~~~~~~
    Cheers! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  5. #5
    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: Invisible characters (Word 97)

    Sometimes Word's "paragraph" mark disintegrates into two things that appear the same but are not. This occurs when I try to work with "text" that Word doesn't like; sometimes it likes it better if it open it as Encoded Text. In other cases, a Word document might have originally been created in Word for Mac, and later became corrupted. It also happened recently in a long Word 2000 doc for no reason. If you do a SaveAs to RTF and open the RTF, all the lines run together. Fun!

    Anyway, one strategy for tackling this is to do a replace all, replacing ^13 with ^p.

    The part about not being able to delete sounds like a more serious problem. I'm sure I have seen this over the years, but don't remember what I did about it. Hope this helps at least a bit.

  6. #6
    Lounger
    Join Date
    Jan 2001
    Location
    Milton Keynes, Buckinghamshire, England
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Invisible characters (Word 97)

    Like you I needed a clean-up routine that would remove empty paragraphs from documents, and what I found was that a simple 'replace all' that searched for two paragraph marks "^p^p" and replaced them with one "^p", would not remove double paragraph marks either at the end of the document or before any table object. If I built such a search into a macro in such a way that it repeated itself so long as "^p^p" was found, the macro would go into an endless loop.

    In the end I got round this by doing the straightforward replace "^p^p" with "^p" about four times (to deal with most of the multiple paragraphs) and then to sweep up the rest with this bit of code:

    Set FoundRange = ActiveDocument.Content

    With FoundRange.Find
    .ClearFormatting
    Do While .Execute(FindText:="^p^p", Forward:=True, Wrap:=wdFindContinue) = True
    FoundRange.MoveStart Unit:=wdCharacter, Count:=1
    FoundRange.Delete
    Loop
    End With

    Would this be useful in your situation?

  7. #7
    Star Lounger
    Join Date
    Aug 2001
    Location
    St. Louis, Missouri, USA
    Posts
    67
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Invisible characters (Word 97)

    BAM,
    Reveal codes? I'd give my eyeteeth for that!

    I tried to attach a sample, but I can't get the file small enough; I have two lines of text and about 6 empty paragraphs, and it's still 162K. Hmmm.

  8. #8
    Star Lounger
    Join Date
    Aug 2001
    Location
    St. Louis, Missouri, USA
    Posts
    67
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Invisible characters (Word 97)

    Robin,
    ! I'm an absolute beginner when it comes to macros, even though I have lots of experience with Word. So I don't really understand it, but your macro did seem to work. It also seems to have gone into an endless loop or something; I used ctrl-break to stop it. When I did that, the file looked great in normal view. When I switch to master document view, I only see one paragraph mark, but it's on a line by itself. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  9. #9
    Lounger
    Join Date
    Jan 2001
    Location
    Milton Keynes, Buckinghamshire, England
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Invisible characters (Word 97)

    I am sorry the macro went into a loop, because I thought I had produced something that would not go into a loop where my ealier efforts had done so.

    On checking, I see that my complete macro turns off Track changes before it runs, because Word will continue to find "^p^p" when Track changes are on, even when one of the paragraphs has been deleted. So if you have Track changes on, that may be the cause of the endless loop.

    I have no experience of Master documents, because all the gurus around this lounge tell us to avoid them if we want to stay out of trouble.

  10. #10
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Canberra City, Australian Capital Territory, Australia
    Posts
    133
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Invisible characters (Word 97)

    Robyn, not sure this will help, but in case it does, there is a really nice program called "Smart Wrap the Clipboard" available from Selznick Scientific Software. You copy something to the clipboard, open Smart Wrap and it shows you the text you copied with all unnecessary line breaks - and < signs that emails make - deleted. You just hit the copy button and then return to your original document and copy the cleaned up version from the clipboard over the messed up version.

    Not very sophisticated but very effective.

    Noel

  11. #11
    BAM
    Guest

    Re: Invisible characters (Word 97)

    **Per my request, lind sent me a couple of examples via private email**

    Hi lind,

    The need to know is very important. Especially in this situation. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    I don't think you would want this document to go out filled with metadata. <img src=/S/yikes.gif border=0 alt=yikes width=15 height=15>

    Track Changes had been turned on in both files and the view of the Revisions were turned off for both the screen and printing. If you go to Tools/Track Changes/Highlight Changes and turn on "Highlight changes on Screen". you'll see what I am referring to. The paragraph marks and such you were unable to remove were those that were added/deleted after Track Changes was turned on.

    To correct, go to Tools/Track Changes/Accept or Reject Changes and click the Accept All command.

    Now you should be able to Find all ^p^p and replace with one. You might need to do this a couple of times to clean it up.
    ~~~~~~~~~~~~~
    Cheers! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  12. #12
    Star Lounger
    Join Date
    Aug 2001
    Location
    St. Louis, Missouri, USA
    Posts
    67
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Invisible--Thank you all for the helpful info!

    <P ID="nt"><font size=-1>(No Text)</font>

Posting Permissions

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