> Hi Jona
> I am not using document.add method to add the template but the saveas
> method
> with the active document .but its still saving the macros as well.
> I do not want to save the macros with the new doc.
If you use SaveAs to save a document under a new name when the document
contains macros, then the new file will also contain macros. But are you
sure your original document does contain macros? By default macros get saved
in a template, not a document, and are available to all documents based on
that template.
If the document does contain macros, I would strongly recommsn you change to
to being a template, and then create new documents based on it using the
Documents.Add method. Documents created by this route definitely do not
contain macros.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Alok - 30 Nov 2004 07:27 GMT
Hi Jon
I could save the macros in the .doc file and not in the normal.dot file.
I am also not too sure about document.add method if it only adds templates
to self.
If i save the ORIGINAL doc as .dot file and the tried saving the NEW file as
.doc file.
It works !!! as it does not contain macros .
BUT IT STILL adds the original file as a reference to the new doc.when i go
to alt+F11 (vba code editer).
Hope i am making myself understandable .
Thanks,
Alok
> If you use SaveAs to save a document under a new name when the document
> contains macros, then the new file will also contain macros. But are you
[quoted text clipped - 6 lines]
> Documents.Add method. Documents created by this route definitely do not
> contain macros.
Jonathan West - 30 Nov 2004 09:12 GMT
> Hi Jon
> I could save the macros in the .doc file and not in the normal.dot file.
[quoted text clipped - 12 lines]
>
> Hope i am making myself understandable .
No really. Forget about what you are doing in VBA at the moment. Simply
describe the overall task and the effect you are trying to achieve.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Alok - 02 Dec 2004 10:55 GMT
Ya Jon
Actually i want to have a dot file with macro .
Which when opened should open a new document with the same content and load
my macro wizard.
but this new file should NOT have any reference to the macros in the
vbaeditor.
Thanks Jon for the effort.
I really appreciate.
> > Hi Jon
> > I could save the macros in the .doc file and not in the normal.dot file.
[quoted text clipped - 15 lines]
> No really. Forget about what you are doing in VBA at the moment. Simply
> describe the overall task and the effect you are trying to achieve.
Jonathan West - 02 Dec 2004 16:39 GMT
> Ya Jon
> Actually i want to have a dot file with macro .
[quoted text clipped - 6 lines]
> Thanks Jon for the effort.
> I really appreciate.
If you duse the Documents.Add method to create a document based on your
template, any toolbars and macros will be available to the user because the
document will be based on the template.
but the toolbars and macros are not stored in the document, so when you save
it and email it to someone without the template, they will not have your
macros.
This article may help you understand what is going on
What do Templates and Add-ins store?
http://word.mvps.org/FAQs/Customization/WhatTemplatesStore.htm

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup