General information
Category:
COM/DCOM and OLE Automation
AFAIK, MS Word uses the NORMAL template as a standard for ALL users; because of that there should be some restrictions to prevent changing it for convinence of one particular user.
If the particular user wants his own template, then he can create a new one and use it in the future.
>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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only