PDA

View Full Version : word hiding or showing logo on prints



MARVEL.nl
04-14-2010, 04:56 AM
Some help needed,

We are using word 2003, and i found this article on the website :

KB id = 104

It explains how to make it possible to enable or hide headers and footers. We are planning to use this on our company's template to prevent double printing of the logo, and make it easier to implement a footer based on the activities we have.

We are however, unable to get it to work, even the sample doens't work.

(sorry i can't paste links yet)

Some help would be appreciated !

Marcel

lucas
04-14-2010, 09:38 AM
Hi Marcel, the kb item works for me in 2003. You have to actually type something into the new document and then hit the print button. Don't try to run the macro directly, it intercepts the print command.

Welcome to the forum. I hope this helps.


Here's a link to Jakes(DRJ) KB entry that you referenced (http://www.vbaexpress.com/kb/getarticle.php?kb_id=104).

macropod
04-14-2010, 04:33 PM
You could achieve much the same result without vba, using a field coded along the lines of:

{QUOTE{ASK Show "Print with logo? (Y/N)" \d N}{IF{REF Show \* Upper}= "Y*" "Logo"}}
where the word 'Logo' in the final expression is replaced with the actual logo or its anchor. Although the prompt asks for Y/N (and defaults to 'N'), it'll accept anything beginning the Y or y for the 'Y' expression and anything beginning the N or n for the 'N' expression.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message.

MARVEL.nl
05-31-2010, 01:04 AM
@macropod

{QUOTE{ASK Show "Print with logo? (Y/N)" \d N}{IF{REF Show \* Upper}= "Y*" "Logo"}}


Where should i put this ?


I noticed that using VBA it only askes once to print the logo or not. Ideally it will ask this any time you print the document. Maybe the coded field works better.


Sinc.


Marcel

macropod
05-31-2010, 03:02 AM
Hi Marcel,

You put the field code into the page header and attach your logo where the 'logo' expression appears in the code. And providing you have the 'update fields' option checked under Tools|Options|Print, the code will prompt you every time you try to print the document.

MARVEL.nl
06-03-2010, 12:49 AM
Hi Marcel,

You put the field code into the page header and attach your logo where the 'logo' expression appears in the code. And providing you have the 'update fields' option checked under Tools|Options|Print, the code will prompt you every time you try to print the document.

Using this in combination with merging documents it gives me some errors every time, and thought i did get the fiel right, i think i might be in error when inserting the logo.

Maybe you could explain :

and attach your logo where the 'logo' expression appears

attach in what matter ?

The vba solution only asks to print when you first print it, i had some other text in the header, i now put this in the footer, which actually is the header too now ;)

macropod
06-03-2010, 02:32 AM
Hi Marcel,

If you're getting errors, that suggests you haven't coded the field correctly.

Try creating the field exactly as shown (don't bother about inserting the logo yet). Then select the field and press F9 to activate it. You should see a dialogue box prompting for a Y/N response. If you respond with 'Y' or 'y', the dialogue box should close and the word 'Logo' should appear in the field in the document. If you respond with 'Y' or 'y', the dialogue box should close and nothing should appear in the field in the document.

If you get an error, press Alt-F9 to toggle the field code display on and edit the field to correct your coding. Otherwise, press Alt-F9 to toggle the field code display and replace the word 'Logo' with your actual logo. When you're done editing, press Alt-F9 to toggle the field code display off.