save file wihout vba macros

H

hals_left

When I create a new file from a template and save it as a document,
(.doc) and then close & re-open it, word still warns me that the .dot
file contains macros. And Project explorer shows all the elements in
the .dot file that creatd it.

How can i save the document created without the vba,macros and
userforms?

thanks
hals_left
 
P

Peter Aitken

hals_left said:
When I create a new file from a template and save it as a document,
(.doc) and then close & re-open it, word still warns me that the .dot
file contains macros. And Project explorer shows all the elements in
the .dot file that creatd it.

How can i save the document created without the vba,macros and
userforms?

thanks
hals_left

That's what templates are for. There's no point in creating a doc from a
template if you do not want the tenplate's elements in the doc. You can
delete all the VBA stuff before saving the doc but it would be easier to
create a template that contains only what you want in the document.
 
H

hals_left

The VBA and Userform elements in the template are soley to populate
the doc with data from a database. Normally users would just print and
sent it by post. Now they want to email it - is there no way of saving
the finshed document without the vba code and userform ?

Is there another way to achieve this?

thanks.
 
R

RBM

Conceptually, you could put all the required code in a global template
that is loaded on startup. It would then be there and available for
use when the document is created but not actually saved with the
document when it's saved.
 
H

hals_left

Charles, that stops the macro warnings, thanks. But the docs created
and saved still contain the vba and form.
 
H

hals_left

Charles, that stops the macro warning, thanks. But the docs created and
saved still contain the templates vba and useforms.
 
C

CarolineJ

The docs created from the template only look like they have the code - but
the code is actually in the document template. If the template was removed
from the PC or the doc is opened on another PC without the template being
available the code would not be there. Also if the document is no longer
'attached' to the template the code will go.
To check you can try Tools, Templates and Addins from the menu, remove the
name of the template from the 'Document Template' box make sure
'Automatically update document styles' is not selected then click on OK.
This attaches the doc to Normal.dot and uses that as the document template.
Now if you check, the code will not be visible - unless of course it also
exists in your normal.dot (but it wouldn't if you emailed it to someone
without the template on the desktop either as the code is not in the doc but
in the tempalte).

Hope that helps and does not confuse

Caroline
 

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