Attaching a template to a document - when opened on other computer

G

Guest

Ok, I have created a macro that removes the header when printing a document.
Now this document will be opened by users on several different computers in a
network (and possibly also computers outside the network).

How can I attach this macro to the document, so that wherever it is opened
the option to print without headers is available? Can I add an alternative
print button in the body or header of the document that users simply can
click?

The problem is that most users will open the document from a database in IE
and won't have the Word toolbars at hand (or they will first have to save the
document to their computer and open it). What I would like then is an easily
available option for users to print without the header (using the macro),
without having to save the document on their computer first.

I have read the excellent guide on the Word MVP site about distributing
macros to other users. But 1) this would mean I have add the template with
the macro on every computer first and 2) is the macro available if only
opening the document within IE from the online database?

Thanks!
 
J

Jezebel

For future reference: you need to solve these problems BEFORE you start
writing code. The problem is, there are no simple solutions for you. You
want people to run code that you've written. That's exactly what virus
writers want also. So in order to keep out the viruses, there's no choice
but to make legitimate code-writers jump through some hoops. If you want
poeple to run your code, you need to put it up front and get them to choose
to install it. No-one in their right minds is going to run code in a
document on the internet; and -- assuming you are a responsible developer
and not a virus-writer yourself -- you shouldn't do anything that might
encourage people to do so.

If you have developed code, then what you offer is an application. Certify
it and provide a legitmate installation/deinstallation method.
 
G

Guest

Hmm ok. Yeah, I get your point. So what I'd need to do is to install the
macro on each computer that will be using it? It can't be automatically
attached to the document?

I have no idea how to make people choose to install the macro, how would I
do that? It's not enough with the dialog box where you select to Activate or
Deactivate macros in the document?

Any other suggestion how I can let people print a document with or without
the header, when the document is to be printed from different computers?

The header contains info about the document, author, version, date, who's
responsible etc. I asked in an earlier post about how to print with or
without that header and one suggestion was to have a macro making the text
white so it won't show when printed and then set it back to the original
color after it's been printed. This is what I now try to achieve.

Thanks!

"Jezebel" skrev:
 
S

Suzanne S. Barnhill

You can save the macro in the document itself, but you still have to ensure
that users (a) have Macro Security set to Medium so they have an option to
enable the macro and (b) choose to enable the macro.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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