How to add or remove image from a menu

S

S. Widmer

Hi,

I'm creating a Word letter template for a company. Users need the option to
add/remove a logo from the header because sometimes letterhead paper with a
pre-printed logo will be used, and sometimes plain white paper will be used
in which case the logo should be printed in the header of the document. I'd
like to create a Logo menu with two options: 'show logo', and 'don't show
logo'.

I can create the new Logo menu in 'tools | options | customize' and save it
in the template. Wiring the two menu options to Visual Basic subroutines is
not a problem. I've tried to use a bookmark in the header, but when I insert
the logo with my code, only the bottom of the logo is visible and the rest
is pushed up into the top margin. I tried looking into using a form field
but apparently that's not possible in the header.

I just don't know where to continue my search. Maybe there is a better way
to do this all together.

Any suggestion or enlightenment would be very helpful.
 
G

Graham Mayor

One way would be to create two autotext entries, one containing the logo in
an unbordered text box, the other containing the text box without the logo.
You could then call the appropriate box using an ASK field on opening the
document e.g.

{ ASK Logo "Add logo?" \d YES \o }{ IF{ REF Logo } = "YES" "{ AUTOTEXT
fullbox }" "{ AUTOTEXT emptybox }" }

All you have to do to make the swap is to update the field - you can use the
code at http://www.gmayor.com/installing_macro.htm to do that.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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