Hi Erwin,
Thanks to follow my case.
Exactly, i mean that the URL of a window points to some word-document
on my server.
But if i use a network path or local path instead the URL the
application works fine.
I get this problem only with Word2000.
Here a piece of my javascript code :
function opendoc(){
if (window.ActiveXObject) {
try {
var app_word = new ActiveXObject("Word.Application");
var doc_word = new ActiveXObject("Word.Document");
} catch (e) {} }
if (!app_word) {
alert('Abandon : Impossible de créer une instance
Word.Application.');
return false;
}
else
{
// var oPathTemplate = "C:\\temp\\Template.dot"
var oPathTemplate = "http:////myserver///Modeles//Template.dot"
try {
/* Add document */
doc_word = app_word.Documents.add(oPathTemplate);
if (!doc_word) {
alert('Abandon : Impossible de créer un document Word.');
app_word.Quit(0);
return false;
}
/* Activation document */
doc_word.Activate();
/* Make it visible*/
app_word.Application.Visible = true;
}
}
Erwin Moller a écrit :
Cedric wrote:
Hi Folks,
I'm wondering if someone has already succeed to open a word2000
document located on server side with javascript code executed by a web
browser on client side.
In fact, i make it without any problem when the client use Word XP &
2003 but no result with Word 2000.
Any suggestions are welcomed,
Thanks in advance for you help,
Cedric
Hi,
It depends on what you mean excactly by 'opening a word document'.
Do you mean that the URL of a window points to some word-document on your
server?
In that case most browsers will open it. IE will open it in its own
IE-window. Other browsers might suggest, but ask you first, if you want to
open the document with the default extensionhandler.
I do not expect a difference for word2003 and word2000, so I am suprised you
find one.
Could you show us the code you use?
Regards,
Erwin Moller