Automated Background printing of Office Documents

Ask a Question related to ASP Components, Design and Development.

  1. #1

    Default Automated Background printing of Office Documents

    Hello,
    I have a client that has about 150 users on a intranet that I've
    created. The server is Windows 2000 with IIS 5.0 and has Office 2000
    installed. The client came to me and asked if it was possible to print
    MS Word and Excel docuements right from the ASP page. First I said sure
    I'll just link the document to the page then you can print it. That's
    not what they wanted, they wanted to be able to click on a link and have
    the server print off the document in the background. Easier said then
    done.

    Well I searched Microsoft KB articles intill I came across an article
    about just that Automated Background printing of Office Documents.
    However Microsoft has a notice that this solutions is not supported
    because of the high load on the servers. Now I'm looking for any
    solution that you might know of that will allow background printing with
    more stability. If you know of any components or code writen in ASP
    that would be great. My current code is as follows.


    <%
    On Error Resume Next
    Dim myExcel
    Dim myBook
    Dim rs
    Dim CurrentFile


    currentfile = Request ("file")

    Set myExcel = CreateObject("Excel.Application")
    Set myBook = myExcel.Workbooks.Open(CurrentFile)
    myExcel.DisplayAlerts = False
    myExcel.FeatureInstall = False

    myBook.PrintOut

    mybook.close 2
    Set myBook = Nothing
    myExcel.Quit()
    Set myExcel = Nothing

    Response.Redirect "print2.asp?type=" & Request ("type")
    %>

    The problem I get is when the document is closing, it doesn't seem to
    completly close the Excel application. Any suggestions are welcome

    Thanks in advance
    Lee

    ________________________________________
    Lee Harris
    Internet Solutions Developer
    15 Lewis Road
    Guelph, Ontario
    N1H 1E9, Canada
    p:519.822.3450
    f:519.822.9212
    [url]http://www.rlbsolutions.com[/url]
    [email]lharris@rlbsolutions.com[/email]


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Lee Harris Guest

  2. Similar Questions and Discussions

    1. Converting Microsoft Office documents to PDF on the fly
      Hi folks, Wondering if the Acrobat SDK allows for converting Microsoft Word, Excel, etc. files to PDF files in a seamless fashion. I want to...
    2. Linking to external office documents
      Is there a way to somehow embed an office document into a PDF so when a link is clicked it opens the document. Right now I have it setup so the...
    3. Converting office documents to protected pdf in java
      Hi All, I am new to java and acrobat...I've read about acrobat sdk but don't try it yet..I've asked by my superrior to do some research on...
    4. Automated Netword printing
      NetSoft is a custom IE based web browser which uses JavaScript and cookies to facilitate automated printing to any local or network printer. Ever...
    5. Automated printing to Distiller
      I automatically print reports to Distiller within Access. The page setup of each report is as follows : Print to specific printer : Distiller...
  3. #2

    Default Automated Background printing of Office Documents

    Hello,
    I have a client that has about 150 users on a intranet that I've
    created. The server is Windows 2000 with IIS 5.0 and has Office 2000
    installed. The client came to me and asked if it was possible to print
    MS Word and Excel docuements right from the ASP page. First I said sure
    I'll just link the document to the page then you can print it. That's
    not what they wanted, they wanted to be able to click on a link and have
    the server print off the document in the background. Easier said then
    done. Well I searched Microsoft KB articles intill I came across an
    article about just that Automated Background printing of Office
    Documents. However Microsoft has a notice that this solutions is not
    supported because of the high load on the servers. Now I'm looking for
    any solution that you might know of that will allow background printing
    with more stability. If you know of any components or code writen in
    ASP that would be great. Or even ASP.NET would be great if some code
    exists. My current code is as follows.


    <%
    On Error Resume Next
    Dim myExcel
    Dim myBook
    Dim rs
    Dim CurrentFile


    currentfile = Request ("file")

    Set myExcel = CreateObject("Excel.Application")
    Set myBook = myExcel.Workbooks.Open(CurrentFile)
    myExcel.DisplayAlerts = False
    myExcel.FeatureInstall = False

    myBook.PrintOut

    mybook.close 2
    Set myBook = Nothing
    myExcel.Quit()
    Set myExcel = Nothing

    Response.Redirect "print2.asp?type=" & Request ("type")
    %>

    The problem I get is when the document is closing, it doesn't seem to
    completly close the Excel application. Any suggestions are welcome

    Thanks in advance
    Lee

    ________________________________________
    Lee Harris
    Internet Solutions Developer
    15 Lewis Road
    Guelph, Ontario
    N1H 1E9, Canada
    p:519.822.3450
    f:519.822.9212
    [url]http://www.rlbsolutions.com[/url]
    [email]lharris@rlbsolutions.com[/email]

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Lee Harris Guest

  4. #3

    Default Re: Automated Background printing of Office Documents

    Our company has developed a application which runs Microsoft Access
    on the server and monitors a table to tell it which reports to run.
    We have a component that the ASP page uses to write records to the table.

    You could easily change the source code to automate Word or Excel.

    Note: Currently our server-side EXE is written in VB6 and does run in the
    foreground
    so the server must be logged on. You could change this to a service.

    Take a look it might help you with an approach. Our solution only runs one
    instance
    of Access and is very stable. Spawning Office applictions from ASP can
    cause problems
    if you get concurrent usage.

    HTH,
    Mark
    RPT Software
    [url]http://www.rptsoftware.com[/url]



    "Lee Harris" <lharris@rlbsolutions.com> wrote in message
    news:%231OTVIXRDHA.212@TK2MSFTNGP10.phx.gbl...
    > Hello,
    > I have a client that has about 150 users on a intranet that I've
    > created. The server is Windows 2000 with IIS 5.0 and has Office 2000
    > installed. The client came to me and asked if it was possible to print
    > MS Word and Excel docuements right from the ASP page. First I said sure
    > I'll just link the document to the page then you can print it. That's
    > not what they wanted, they wanted to be able to click on a link and have
    > the server print off the document in the background. Easier said then
    > done.
    >
    > Well I searched Microsoft KB articles intill I came across an article
    > about just that Automated Background printing of Office Documents.
    > However Microsoft has a notice that this solutions is not supported
    > because of the high load on the servers. Now I'm looking for any
    > solution that you might know of that will allow background printing with
    > more stability. If you know of any components or code writen in ASP
    > that would be great. My current code is as follows.
    >
    >
    > <%
    > On Error Resume Next
    > Dim myExcel
    > Dim myBook
    > Dim rs
    > Dim CurrentFile
    >
    >
    > currentfile = Request ("file")
    >
    > Set myExcel = CreateObject("Excel.Application")
    > Set myBook = myExcel.Workbooks.Open(CurrentFile)
    > myExcel.DisplayAlerts = False
    > myExcel.FeatureInstall = False
    >
    > myBook.PrintOut
    >
    > mybook.close 2
    > Set myBook = Nothing
    > myExcel.Quit()
    > Set myExcel = Nothing
    >
    > Response.Redirect "print2.asp?type=" & Request ("type")
    > %>
    >
    > The problem I get is when the document is closing, it doesn't seem to
    > completly close the Excel application. Any suggestions are welcome
    >
    > Thanks in advance
    > Lee
    >
    > ________________________________________
    > Lee Harris
    > Internet Solutions Developer
    > 15 Lewis Road
    > Guelph, Ontario
    > N1H 1E9, Canada
    > p:519.822.3450
    > f:519.822.9212
    > [url]http://www.rlbsolutions.com[/url]
    > [email]lharris@rlbsolutions.com[/email]
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    Mark Andrews Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139