arst06d
Programmer
- Nov 29, 2002
- 324
Hi
I want to open a document in Word, print it then close word. I have this working, but I want to make sure that the document is opened read-only - and I need some help with the syntax.
I vb I would:
the last parameter to the documents.open specifies that the doc is opened read-only
in javascript I have:
I the javascript, it doesn't like having any additional parameters to the oWord.Documents.Open method
I want to open a document in Word, print it then close word. I have this working, but I want to make sure that the document is opened read-only - and I need some help with the syntax.
I vb I would:
Code:
dim oWord
set oWord = createobject("word.application")
oword.documents.open "c:\mydocs\testdoc.doc",,true
in javascript I have:
Code:
var oWord = new ActiveXObject("Word.Application");
oWord.Visible=true;
oWord.Documents.Open("c:\\mydocs\\testdoc.doc");
oWord.PrintOut(true);
oWord.Quit();
I the javascript, it doesn't like having any additional parameters to the oWord.Documents.Open method