How to print multiple WORD docs from browser?

M

Mark Findlay

My current ASP app http-links to a single MS Word doc so that when users
click on the doc link, the document is opened via their local copy of MS
WORD. From there, they can press their PRINT button from within Word to
print the document.

However, I would like to be able to provide a link that would automatically
print several word docs on the user's printer without requiring them to open
each doc individually and press the Print button. Is this possible?

It is for a secure internal intranet, everyone using the latest IE and
everyone having MS Word on their machines.

3rd party controls are also acceptable if this is the only way. Is there a
Windows Scripting Host procedure that can be used? Javascript?

Thanks for any help!

M
 
P

Peter Huang [MSFT]

Hi Mark,

I have written a sample code using the VBScript, you may have a try and let
me know if it does the work for you. You may put the
test.asp,test.doc,test1.doc and test2.doc into your <inet>\wwwroot
directory. In addition, in the Internet Explorer you should navigate to
Tools/Internet Option/Security/Local Intranet, then click the Custom level.
That will open the security setting dialog, set the ¡°Active Control and
Plug-ins / Initialize and script Active controls not marked as safe ¡°
option to Enable.

[Test.asp]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META name=VI60_defaultClientScript content=VBScript>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.3790.0" name=GENERATOR>
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Sub button1_onclick
dim wd
Set wd = CreateObject("Word.Application")
document.write("test")
wd.Documents.Open "http://localhost/test.doc"
wd.Documents.Open "http://localhost/test1.doc"
wd.Documents.Open "http://localhost/test2.doc"
wd.Documents.Item(1).PrintOut
wd.Documents.Item(2).PrintOut
set wd = nothing
End Sub
-->
</SCRIPT>
</HEAD>
<BODY>
<P><INPUT id=button1 type=button value=Button name=button1></P></BODY>
</HTML>


Hope this will help you.


Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


--------------------
NNTP-Posting-Date: Mon, 18 Aug 2003 16:25:41 -0500
From: "Mark Findlay" <[email protected]>
Newsgroups: microsoft.public.office.developer.vba,microsoft.public.word.vba.general
Subject: How to print multiple WORD docs from browser?
Date: Mon, 18 Aug 2003 14:25:40 -0700
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Lines: 20
NNTP-Posting-Host: 216.231.47.103
X-Trace: sv3-Myo7cs1dzaPhuu3aEFJqMsGViiHwdLwCwMGaoiiHCga5FxFKGduGPvJiaziYKzDAbUv2UWCi
9toJMD3!tF5jisrnZFxMPBYwswpOrhDRTqX1qjelGEI4wMDVrPiyHQNH021YAheLBXUwgNUdSb6G
hul/7bMn!bBnn+5OUhT5aBvgB8sxTdw==
X-Complaints-To: (e-mail address removed)
X-DMCA-Complaints-To: (e-mail address removed)
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.1
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!newsfee
d01.sul.t-online.de!t-online.de!newspeer1-gui.server.ntli.net!ntli.net!peer0
1.cox.net!cox.net!border3.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.
com!nntp.giganews.com!nntp.speakeasy.net!news.speakeasy.net.POSTED!not-for-m
ail
Xref: cpmsftngxa06.phx.gbl microsoft.public.word.vba.general:41004 microsoft.public.office.developer.vba:16634
X-Tomcat-NG: microsoft.public.office.developer.vba

My current ASP app http-links to a single MS Word doc so that when users
click on the doc link, the document is opened via their local copy of MS
WORD. From there, they can press their PRINT button from within Word to
print the document.

However, I would like to be able to provide a link that would automatically
print several word docs on the user's printer without requiring them to open
each doc individually and press the Print button. Is this possible?

It is for a secure internal intranet, everyone using the latest IE and
everyone having MS Word on their machines.

3rd party controls are also acceptable if this is the only way. Is there a
Windows Scripting Host procedure that can be used? Javascript?

Thanks for any help!

M


Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top