Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Feb 2004
    Location
    Hsinchu, Taiwan
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    viewable BUT non-printable (2000-2003)

    Dear Loungers,
    Is there a way of making a .tif graphic visible in the header of a mail-merge document onscreen but invisible when the document prints?

    I use an Access 2000 database as the datasource for form letters. Professionally printed stationary used for correspondence already contains company logo and contact info at the top of the sheet . I have a .tif file (that looks just like the top of the stationary) that I want to put in the header of the mail-merge document so as to see how the entire document will look when printed. The database will be distributed to users with various versions of Office (2000, XP & 2003) . So, whatever fix only needs to be executed using Word 2000. But when the mail-merge document is opened on later versions, I would like the .tif graphic to be visible but non-printable. Any suggestions?

    Thanks,
    Brady

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: viewable BUT non-printable (2000-2003)

    Put the graphic in the header as an inline shape. Say that it is in the first paragraph. The following event procedure in the ThisDocument module will hide the picture if the version is greater than 9.0 (Word 2000)

    Private Sub Document_Open()
    ActiveWindow.View.ShowHiddenText = True
    ThisDocument.Sections(1).Headers(wdHeaderFooterPri mary) _
    .Range.Paragraphs(1).Range.Font.Hidden = (Application.Version > "9.0")
    End Sub

    The first line ensures that hidden text is displayed on screen.

    Make sure to make the top margin large enough.

  3. #3
    New Lounger
    Join Date
    Feb 2004
    Location
    Hsinchu, Taiwan
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: viewable BUT non-printable (2000-2003)

    Hans,
    Thank you for taking the time to help out. I changed your code to > "8,0" so it would work with my Word 2000 also. However, although the graphic appears on the screen but does not print out (because the Format>Font>Effects is set to "Hidden"), I still have a problem.

    When the letter is printed, the first line jumps up higher on the page that how it looks on the screen. This will overlap my stationary logo. Is there any way around that ?

    Brady

  4. #4
    New Lounger
    Join Date
    Feb 2004
    Location
    Hsinchu, Taiwan
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: viewable BUT non-printable (2000-2003)

    I take that last comment back Hans. When I shut down Word and reopened it, whalla! It worked fine. Thanks for all your help.
    Sincerely appreciative,
    Brady <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>

  5. #5
    New Lounger
    Join Date
    Feb 2004
    Location
    Hsinchu, Taiwan
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: viewable BUT non-printable (2000-2003)

    Sorry to trouble you again Hans but when I opened the document today, the tif. does not appear onscreen again. However, the code you offered does work but only if I go into Visual Basic Editor and select Compile Project from the Debug menu, then go back to the Word document and the .tif has appeared.

    Is there a way to have the document open properly without going into the VB Editor?

    In Post number 441472 below, please check to see if I am doing everything correctly. Thanks,
    Brady

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: viewable BUT non-printable (2000-2003)

    I only have one version of Word to test with (Word 2002 AKA XP), but your description seems to imply that the Document_Open code is not run if you open the document in another version of Word than it has last been saved in. I don't know of a way around that.

    By the way, there is another problem with the code I posted: since Application.Version is a string, the comparison is done alphabetically, not numerically. This can lead to unintended results. Here is a corrected version - but, as I wrote, I cannot test it on different versions of Word.

    Private Sub Document_Open()
    Dim strVersion As String
    strVersion = Application.Version
    strVersion = Left(strVersion, InStr(strVersion, ".") - 1)
    ActiveWindow.View.ShowHiddenText = True
    ThisDocument.Sections(1).Headers(wdHeaderFooterPri mary) _
    .Range.Paragraphs(1).Range.Font.Hidden = (CLng(strVersion) > 9)
    End Sub

  7. #7
    New Lounger
    Join Date
    Feb 2004
    Location
    Hsinchu, Taiwan
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: viewable BUT non-printable (2000-2003)

    Thanks for trying Hans!

Posting Permissions

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