Make VISIBLE header graphic NON-printable

B

Brady

I am running Word 2000 SP-3 on Windows XP SP2.

Is there a way of making a .tif graphic viewable in the header of a
mail-merge document onscreen but invisible when the document prints? I use an
Access 2000 database as the data source 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).

I received some help at another newsgroup that was unsuccessful. I was told
to put the graphic in the header as an inline shape. Then, on the Format menu
set the text to Hidden. I was also reminded to make sure the top margin is
large enough. The code below only works after selecting Compile Project from
the Debug menu in the VB Editor. However, it does not run automatically when
the document is opened.

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(wdHeaderFooterPrimary) _
.Range.Paragraphs(1).Range.Font.Hidden = (CLng(strVersion) > 8)
End Sub

When the mail-merge document is opened, I would like the .tif graphic to be
visible but non-printable. Is there a way?

Thanks!
Brady
 
J

Jean-Guy Marcil

Brady was telling us:
Brady nous racontait que :
I am running Word 2000 SP-3 on Windows XP SP2.

Is there a way of making a .tif graphic viewable in the header of a
mail-merge document onscreen but invisible when the document prints?
I use an Access 2000 database as the data source 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).

I received some help at another newsgroup that was unsuccessful. I
was told to put the graphic in the header as an inline shape. Then,
on the Format menu set the text to Hidden. I was also reminded to
make sure the top margin is large enough. The code below only works
after selecting Compile Project from the Debug menu in the VB Editor.
However, it does not run automatically when the document is opened.

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(wdHeaderFooterPrimary) _
.Range.Paragraphs(1).Range.Font.Hidden = (CLng(strVersion) > 8)
End Sub

When the mail-merge document is opened, I would like the .tif graphic
to be visible but non-printable. Is there a way?

Where is your Document_Open macro located?

It has to be in the ThisDocument module if you want it to execute
automatically when the document is opened.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
B

Brady

Thank you Jean-Guy for your response. Yes, the code I described IS in the
ThisDocument module. However, when the document opens, the .tif graphic is
hidden. Only after the code is compiled manually using the VB Editor does it
behave properly. I did not write the code myself. I have hardly any
experience at all writing macros in Word. All my VB experience has been using
Access. However, my expertise rating is probably only "intermediate" using VB.
To me it seems ambiguous though to have 2 lines with contradicting
definitions:

strVersion = Application.Version
strVersion = Left(strVersion, InStr(strVersion, ".") - 1)

Could that be the problem? Or do you have any other suggestions?
Thanks!
Brady
 
B

Brady

Jean-Guy,
Sorry to take so long to get back to you but the Discussion Group site
evidently had some problems yesterday and I was unable to reply.

Your last message solved my problem. Much Thanks! When I ran the Stop, upon
reopening the document a message appeared notifying me that Word's Security
Level was set to High, thus disabling all unsigned macros (like I told you, I
am not very experienced with programming Word). Anyway, I changed the level
and then resaved the document under another name. All went well.

The funny thing is that when I reset Word's Security back to High and
re-opened the document... it still worked. I don't know why, but I am not
complaining.

By the way, just for the record, in answer to your last query, it was a .doc
file, not a template.

Thanks again for all your help!
Brady
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top