G
guido
Hi,
is it possible to attach a template to a document, after it has been
created? I have the following code in JavaScript (it's for a web
application):
<script>
function openWord() {
var wordApp = new ActiveXObject("Word.Application");
wordApp.Visible = true;
wordApp.Documents.Open("http://localhost/dev/test1.doc");
//this alert shows "Normal.dot":
alert(wordApp.ActiveDocument.AttachedTemplate);
//and this also shows "Normal.dot":
alert(wordApp.Documents(1).AttachedTemplate);
//but this doesn't attach the template (i've tried putting the
template in other folders as well:
wordApp.Documents(1).AttachedTemplate =
"C:\Inetpub\wwwroot\dev\test1.dot"
}
</script>
....should this work? what should the code look like?
Thanks in advance.
is it possible to attach a template to a document, after it has been
created? I have the following code in JavaScript (it's for a web
application):
<script>
function openWord() {
var wordApp = new ActiveXObject("Word.Application");
wordApp.Visible = true;
wordApp.Documents.Open("http://localhost/dev/test1.doc");
//this alert shows "Normal.dot":
alert(wordApp.ActiveDocument.AttachedTemplate);
//and this also shows "Normal.dot":
alert(wordApp.Documents(1).AttachedTemplate);
//but this doesn't attach the template (i've tried putting the
template in other folders as well:
wordApp.Documents(1).AttachedTemplate =
"C:\Inetpub\wwwroot\dev\test1.dot"
}
</script>
....should this work? what should the code look like?
Thanks in advance.