Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Javascript and ActiveX word 2000 issue

Reply
Thread Tools

Javascript and ActiveX word 2000 issue

 
 
Sylum
Guest
Posts: n/a
 
      06-22-2006
Hi everyone,

I'm coding an web application with Javascript and ActiveXWord 2000.
Basicly, on the client side, i use javascript to create an instance
Word 2000 in order to have a new document from template (.dot) located
on my serveur. When the application run i get an error. In fact, the
problem come when i put an URL like
"http:////myserveur///Modeles//Template.dot" into my method
"app_word.Documents.add(URL)" but if i use a classic path like
"C:\\temp\\Template.dot" the application work fine. Please Any
suggestion ?

by the way, with the active word 2003 i get no problem at all even with
the URL.

Below a piece of my 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:////myserveur///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;
}
}

tnx in advance,

Cedric.

 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      06-22-2006
Sylum said the following on 6/22/2006 4:53 AM:
> Hi everyone,
>
> I'm coding an web application with Javascript and ActiveXWord 2000.
> Basicly, on the client side, i use javascript to create an instance
> Word 2000 in order to have a new document from template (.dot) located
> on my serveur. When the application run i get an error. In fact, the
> problem come when i put an URL like
> "http:////myserveur///Modeles//Template.dot" into my method
> "app_word.Documents.add(URL)" but if i use a classic path like
> "C:\\temp\\Template.dot" the application work fine. Please Any
> suggestion ?


Maybe because Word 2000 has no concept of opening a file from a web server.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ActiveX control in python vs ActiveX control in vb 6 (piece of code) vml Python 0 08-22-2007 09:57 AM
Trying to use the GoTo method of the Word.Application ActiveX object in JavaScript MayBoy Javascript 6 12-14-2006 02:39 PM
Major ActiveX Domain issue. NOT LOCAL PC ISSUE joe.valentine@gmail.com Computer Support 8 02-06-2006 09:03 PM
ActiveX apologetic Larry Seltzer... "Sun paid for malicious ActiveX code, and Firefox is bad, bad bad baad. please use ActiveX, it's secure and nice!" (ok, the last part is irony on my part) fernando.cassia@gmail.com Java 0 04-16-2005 10:05 PM
Word 2000 (deinstall options in Word comming from other applications) Rene de Kruijf Computer Support 1 12-27-2003 01:00 PM



Advertisments