Hi Yuri,
Thanks for your quick answer. Let clearify. I don't want to create a document (.doC) I just want the user to be able to modify a Template (.doT) but Word insists on opening a template to be used as such and when I save it as a .doT it requests another name, it does not like to save this as a template.
Peter
>Method "add" provides you with options. As in VBA for Word help:
>*--------------
>expression.Add(Template, NewTemplate)
>expression Required. An expression that returns a Documents object.
>Template Optional Variant. The name of the template to be used for the new document. If this argument is omitted, the Normal template is used.
>NewTemplate Optional Variant. True to open the document as a template. The default value is False.
>*----------------------
>Thus depending on what do you mean, "open a word template file", you may use:
>- oWord.Documents.add() to open a new document based on the Normal template;
>- oWord.Documents.add(,.t.) to open a new template based on the Normal template;
>- oWord.Documents.add("C:\Program Files\Microsoft Office\Templates\yourtemplate.DOT",.t.) to open a new template based on the custom template.
>
>In all cases you may SAVEAS the document as template with .dot extension.
>
>
>
>
>>How can I open a word template file and save it as a .doT file.
>>I need to be able to programmatically open a .dot, let the user modify it and then save it again in the same space as a .dot.
>>
>>Thanks
>>
>>Peter
Peter Cortiel