Hi all,

I am writing an asp on a remote server on a local network. When a user clicks on the name of a word dot file I want to start word with this specific dot file. My fist attempt was to create an object with javascript "new ActivXObject("Shell.Application"). This is not possible due to permission restrictions.

I have learnt that it is possible to write an own activeX controll to handle the word automation and to mark it as safe for scripting in the registry. Does anyone have more information how to do this in assembler or an example of an activeX dll written in assembler. I have read some on this link.

Best regards
Posted on 2004-10-13 13:39:26 by minor28
I worked on a Document Control App that use a .DOT for features with MASM32 program to Control the process. I will give you an outline of what I did, but you will need to wrap it in a COM object for your .asp project to use it.

Due to Word.8 limitations with .DOTs on the Commandline, I had to pass the name of file.DOC through an .INI file in the Temp folder.

In a regular .exe file.
1. Looked up the Current Word to make sure it was high enough for the .dot to work. Produce a error message, if it did not.
2. Write out file name of .doc from Commandline to .ini for document to work with. The .dot reads it and loads the right .doc file with it starts.
3. Start it with a CreateProcess call with the WinWord.exe location read in from registry ( Some people have more than one loaded. ). With the Commandline parameters set to start Word with my .dot file.

With web stuff like this, watch your permissions and security with all these programs.

Regards, P1 8)
Posted on 2004-10-15 17:21:40 by Pone
Hi Pone,

Thanks for your answer. The problem is the COM thing, security and permission. I have written an ordinary working dll to start winword.exe. I will work on it.

Regards
Posted on 2004-10-16 08:56:05 by minor28
Hi minor28,

couldn't you start the word application with

CreateObject("Word.Application")

Possibly this doesn't help much, but at least you don't need a "Shell.Application" object.

Japheth
Posted on 2004-10-17 13:17:07 by japheth
I have a web page with word tempates (*.dot). Clicking on a template should start an Word with this dot-file. The dot file has a startup macro which should run. I want the word instance to be separated from the iexplorer. I can't quit and release the word automation i a proper way, I think. That's why I use shell. Even if I want to use word automation I don't think it will work because of security purposes. The dll must be registered as safe. Now I am trying to write a com dll to be registered as safe. This dll will start word. I have never written a com dll so I have much to learn.

Best regards
Posted on 2004-10-17 17:06:11 by minor28