disable macro on a document

A

Associates

Hi,

I wonder if i could get some help here. What happens is that we have some
word documents that sometimes may have some macros in it. And what i was
trying to do is to disable them (if any) before saving the document and have
it sent to our clients (who are not able to open them if there are macros).
My question is that what might be the best way of accomplishing this task.
Initially, i was thinking of saving it as .RTF file. But when i open it, it
still has the macro in it. Then, i found some codes to disable the macro.
This will disable the macro completely. What worries me now is that when the
document is returned back from the client, i have to manually enable the
macro through the code so that i can use it (this require someone who knows
the code well - what about normal users?). Is there a better way of getting
around this issue?

Your help would be greatly appreciated.

Thank you in advance
 
D

Doug Robbins - Word MVP

The macros should be in the template from which the document is created, not
in the document itself.

If that is where they are, and assuming that you create the documents by
using File>New and then selecting the template, the client will never see
the macros. When you receive the document back from the client, you may
have to re-attach the template to the document via Tools>Templates and
Add-ins.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

Jean-Guy Marcil

Associates said:
Hi,

I wonder if i could get some help here. What happens is that we have some
word documents that sometimes may have some macros in it. And what i was
trying to do is to disable them (if any) before saving the document and have
it sent to our clients (who are not able to open them if there are macros).
My question is that what might be the best way of accomplishing this task.
Initially, i was thinking of saving it as .RTF file. But when i open it, it
still has the macro in it. Then, i found some codes to disable the macro.

????
If you save as *.rtf, then macros ARE lost.
In Word 2003 there is even a pop up that warns you that if you continue with
the "Save As", macros will be lost...

If the macros were still there, then either you did not save as *.rtf
correctly; or, if you did, and then saved back as a *.doc, then it means that
the macros are in the template, not the document itself.
In which case, see Doug's post.
 
G

Gordon Bentley-Mix

Jean-Guy & Doug,

This has been asked and answer previously - apparently to no effect. (See my
posts under the 'disable macros for office 03' thread initiated by this
user.) I think maybe you're trying to teach a pig to sing...
--
Cheers!
Gordon

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 
M

Mkate

Hello,

I wonder if I could add a question to this query. I, too, have a similiar
situation with many macros in my templates that are displayed across three
toolbars. Our users use the File/New format for creating a new document
based on this template.

Does the response that the customer will not see the macros if the file is
created that way mean that they will not see any toolbars at all?

Thank you.
 
G

Gordon Bentley-Mix

Mkate,

Assuming that the customers will not have access to the template, then the
answer is yes, the customers will not see any toolbars.

Toolbars (and the related code behind them) are template-specific and are
not stored within any documents created from the template. However, the way
Word works is that if it can find the template on which a document is based,
it will display any toolbars from the template. Conversely, if the template
cannot be found, then the toolbars will not be displayed. If you look in the
document (Tools | Macro | Macros... in Word 2003), you will not find any
macros. In fact, you get a bit of a clue about how this works in the "Macros"
dialog box: the template on which the document is based will not be listed in
the "Macros in:" dropdown, and there will be no macros listed if you select
the document itself in this dropdown.
--
Cheers!
Gordon

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 

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