473,480 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Javascript and ActiveX word 2000 issue

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.

Jun 22 '06 #1
1 2330
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/
Jun 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
481
by: Ken | last post by:
Hi, I'm trying to access the values of properties -- summary and custom without opening Word to do a cleanup op but the customer i'm doing it for only has Office 2000. I'm using c# in .net 2003...
0
1527
by: Sudipto Sen | last post by:
================== Problem Description ================== Following code is for 1. Load a Word Template called CustomerInfo1.dot 2. CustomerInfo1.dot is a normal Word Template with Form fields...
1
1555
by: Raju Joseph | last post by:
Hi All, I have a small problem at hand and am looking for suggestions. I have created a wrapper for word 2000 for our application which is in VB.NET 2003. Everything works fine in the sense...
1
2137
by: moelleni | last post by:
Hi, I made an Access 2002 Database and wanted to automate it to sent the current record to Word 2002. So readed the article "How to send the current record to Word 2000 with automation" I tried...
1
1954
by: Arjen van der Hulst | last post by:
Hi all, I am trying to implement some Word-automation using the range.find-object (using VB.net and Word 2000, early binding). The sample underneath worked well, but after installing an 'after...
5
5318
by: Mason | last post by:
I'm having some problems converting VBA for Word 2000 to code that VB.Net understands. I recorded a macro in Word to add numbering (a. b. c.) to my paragraphs. I managed to translate quite a bit...
2
3653
by: Andrew Cranwell | last post by:
Hi, Please redirect me if I am in the wrong group for this question... this is my first post to this group, so I hope it is clear! I am working on an automation project in VB.NET and have to...
1
1968
by: tonten | last post by:
I've been searching for a while now for a solution to the firefox word wrapping issue. I found a solution here @ http://javascript.about.com/library/blspline.htm I followed the instructions...
2
2142
by: JeffN825 | last post by:
Hello, Thank you in advance for any assistance. I am trying to set up a mail merge from VB6/VBA code with Word 2000 using an ODBC data source (SQL 2000). I have successfully gotten the...
0
7084
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6739
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6929
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4779
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
181
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.