Results 1 to 8 of 8
  1. #1
    vlreed
    Guest

    Printing Hidden Text (97)

    I need to be able to print the hidden text in Word (spaces, tabs, carriage controls...). Right now I'm hitting the Print Screen button (with the hidden text shown), pasting it into another document, and then printing it from there. It's too time consuming, is there a quicker way to do this?

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Printing Hidden Text (97)

    For future reference, what you are referring to are non-printing control characters. Hidden text is text which has been formatted with the hidden attribute.

    Unfortunately, there is no way to do what you want short of the method you are using.

    It is possible with a replace macro to replace the non-printing characters with ones that look the same and print. However, this makes a real hash of formatting since it changes every paragraph into a single word - so far as Word is concerned. It also requires tweaking the margins to allow for the extra pillcrow (paragraph mark) characters. At least for occasional use or immediate use, this is not any quicker than the method you are using.

    Why do you need to do this? Perhaps someone will have an idea that will meet your needs in another way.
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Quakertown, PA, Pennsylvania, USA
    Posts
    517
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing Hidden Text (97)

    I LOVE, LOVE, LOVE SnagIt from www.techsmith.com

    It makes a far better image and lots more formats to choose from than the print screen option. Download a free trial. Make sure you check out ALL the different options.

  4. #4
    vlreed
    Guest

    Re: Printing Hidden Text (97)

    I am creating an EBCDIC file with variable length records on a mainframe which is being translated to ASCII as it is being loaded to the PC. I need a printout verifying that nothing was added or deleted (except the addition of line control characters) in the translation of the file.

    Downloading is forbidden and I cannot access the file from home.

  5. #5
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Quakertown, PA, Pennsylvania, USA
    Posts
    517
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing Hidden Text (97)

    Hmmm. Can you install? Can you receive 3.2MB emails? I downloaded it (again) if you want it.

  6. #6
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing Hidden Text (97)

    Could you replace each non-printing symbol with a printing one?

    In VBA:
    <pre> Dim rng As Range
    Set rng = ActiveDocument.Range
    rng.Text = Replace(rng.Text, vbCr, Chr(182) & vbCr)
    rng.Text = Replace(rng.Text, " ", Chr(183))
    rng.Text = Replace(rng.Text, vbTab, "~")</pre>

    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  7. #7
    vlreed
    Guest

    Re: Printing Hidden Text (97)

    Installing here takes too much red tape.

    It seems using a macro to replace the non-printing symbols are definitely the way to go. The compiler didn't like Replace. So I recorded a Find/Replace macro then changed the code to what I needed. I now have printable symbols that look just like the non-printable ones. Thanks for the tip!

    Just in case anyone else tries this. I had to paste the symbols into the Find/Replace box. When I tried to paste it directly into the code, the symbol reverted to another character set (I didn't check to see which one). I had some trouble pasting the paragraph mark. So I ended up making a shortcut for it and using the shortcut to put it in the Find/Replace box.

  8. #8
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing Hidden Text (97)

    Whoops- I forgot that the "Replace" function only came with Office 2000.

    So here's the code with a replace function:<pre>Dim rng As Range

    Set rng = ActiveDocument.Range
    rng.Text = Replace(rng.Text, vbCr, Chr(182) & vbCr)
    rng.Text = Replace(rng.Text, " ", Chr(183))
    rng.Text = Replace(rng.Text, vbTab, "~")

    Function Replace(Source As String, Searchfor As String, ReplaceBy As String)
    Dim lngPos As String
    lngPos = InStr(LCase$(Source), LCase$(Searchfor))
    If lngPos = 0 Then
    Replace = Source
    Else
    Replace = Left(Source, lngPos - 1) + ReplaceBy + _
    Mid$(Source, lngPos + Len(Searchfor))
    End If
    End Function</pre>


    But for the Word replace- finding ^p will find a paragraph mark; ^t will find a tab. In the "Find/Replace" dialog box, click on "More" then "Special" for a full list.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

Posting Permissions

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