Results 1 to 5 of 5
  1. #1
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hide/Unhide Graphics (2000)

    I've run up against this numerous times before and finally seek a definitive solution, not the half-baked methods I've been using in the past. My problem is best explained by example.

    I have a page containing one or more graphics, and an appropriate amount of empty space for what's to come. This page has already been printed. Somebody decides they wanted some text to appear in the empty space. OK, I add the text, but rather than reprint the page, I overprint the existing printed page. Naturally, I only want the printer to print the newly added text, not overprint what's already been printed on the page.

    What I've been doing is to
    - add the new material
    - save the doc
    - edit the graphics so as to delete the images but retain the "real estate" they occupied as empty space
    - overprint the page
    - close the doc but not save changes (so that I get the graphics back!)

    I'm wondering if there's a better way to hide then unhide the graphics (text is easy). I seem to have to go through this procedure fairly often, due to shared editing of documents. Ideas appreciated.

    Alan

  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: Hide/Unhide Graphics (2000)

    If your graphics are drawing layer objects, rather than inline shapes (when you look at the Layout tab in the Format Picture dialog, it will be something other than In Line with Text), you can suppress the printing of those objects under Tools > Options... > Print tab > Include with documents section > Drawing objects.

    For inline shapes, though, that won't work. I'm not aware of any "clean" approaches to that situation.

    Let me assume that you use inline graphics and that you don't mix text and graphics in the same paragraph. One approach, then, along the lines of what you already do, would be to use a macro that: visits each inlineshape object, figures out its height in points, assigns that height to the paragraph in which it sits (using At Least as the line spacing rule) and then hides the inlineshape. If you have several graphics of different heights in the same paragraph, I suppose the macro should be sufficiently intelligent to recognize that and use the tallest height. Of course, when it comes time to "undo" this process, one would hope the paragraphs' line spacing settings did not deviate from their underlying style. Otherwise, you would have to keep track of their original heights rather than simply resetting them, and this could create many challenges.

    As a short term, less automated, fix, you could select the tallest graphics in a paragraph and run this macro to set the paragraph's height to match it and then hide the graphic:

    <pre>Sub MakeParaTallAsInlineShape()
    ' An inline graphic must be selected or will crash; I'm not
    ' checking that first, even though I should!!
    With Selection
    ' Set paragraph height rule: exact is too short
    .Paragraphs(1).LineSpacingRule = wdLineSpaceAtLeast
    ' Extract height of graphic and make that the para height
    .Paragraphs(1).LineSpacing = .InlineShapes(1).Height
    ' Hide the selection: only the graphic should be selected
    .Font.Hidden = True
    End With
    End Sub</pre>

    Hope this helps.

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

    Re: Hide/Unhide Graphics (2000)

    Hi Alan:
    Another thing you can try (perhaps) is to print Draft Output (Tools/Options/Print tab). Word will skip printing your graphics. However, if your document is heavily formatted, that won't work. It will print underlined & bold in draft output, though.

  4. #4
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide/Unhide Graphics (2000)

    Thanks Jefferson. That's a neat little macro for the repository! The nature of the graphics can vary widely in these situations. Some are inserted as pictures from existing files, others on-the-fly drawings, still others OLE objects. It's a pretty broad array of potential "things". But since it's usually just the one page (hopefully) to tweak, the semi-automated method you suggest, applied two or three times will probably do the trick.

    It just dawned on me reading your post, that a "safer" adaptation of what I was doing would be to copy the whole page to a new document, and butcher it there to my heart's content - no undo, no loss!

    thanks

    Alan

  5. #5
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hide/Unhide Graphics (2000)

    Thanks Phil. I think your solution would work in some cases that I encounter, but not others. As you say, it depends on the degree of complexity of the new material. Often though, it's just something short & sweet or a rider clause or similar and Draft Output might be the Q&D way to go. I guess Print Preview would be "true" to the Draft Output setting?

    Alan

Posting Permissions

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