0

Hi all,

i have a link that opens .doc files, .docx files, csv files or .xls or .xlsx files. i want silent printing of these files. Only one file opens at a time.

If silent printing is not possible then atleast print dialog box should open up along with the file. i am trying to implement this using javascript.

<script>
var w=new ActiveXObject('Word.Application'); 

var obj;
if (w != null)
{
w.Visible = true;
obj=w.Documents.Open("d:\\2.5\\test.docx"); 
var docum = obj.value;
w.Documents.Save();
w.Quit();
}

</script>

this script opens the document. but i am not able to open print dialog box on it.

thanks,

2
Contributors
1
Reply
3
Views
7 Years
Discussion Span
Last Post by fxm
0
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
  <head>
    <meta name="generator" content=
    "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org">
    <script type="text/javascript">

    var w=new ActiveXObject('Word.Application'); 

    if (w){
      w.Visible = true;
      w.Documents.Open("d:\\2.5\\test.docx"); 
      w.ActiveDocument.PrintOut();
      w.Quit();
    }

    </script>
    <title></title>
  </head>
  <body>
  </body>
</html>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.