How to printout doc with Custom User Account?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: How to printout doc with Custom User Account?

  1. #1
    Join Date
    Feb 2005
    Posts
    91

    Question How to print word doc with Custom User Account?

    Hi people,

    I have the following code to print a word doc by pressing a button on the website. The code works when I use the machine user account, but as soon as I set <impersonate="true" userName="customAccount" password="****" /> the print method stop working.

    here's my code to print word doc


    Code:
    ' -- Print the document.
    
    Try
    
          wordApp.ActivePrinter = "\\ServerName\PrinterName"
    
          wordApp.ActiveDocument.PrintOut( _
    
          Range:=Word.WdPrintOutRange.wdPrintAllDocument, _
    
          Item:=Word.WdPrintOutItem.wdPrintDocumentContent, _
    
          Copies:=1, _
    
          Background:=False)
    
    Catch ex As Exception

    What do I need to do with "customAccount" in order to make the printer work, because it works without defining "customeAccount" in Web.config file?

    Please help

    Thanks

    Kero
    Last edited by kero; 09-27-2005 at 11:18 AM.

  2. #2
    Join Date
    Feb 2005
    Posts
    91
    Hi people,

    I have the following error when I try to print.

    The RPC server is unavailable

    Please help

    Thanks

    kero

  3. #3
    Join Date
    Nov 2005
    Posts
    1
    kero, did you find the answer to your question? I'm having the same problem.

    Thanks.

    Shadow...

Similar Threads

  1. Replies: 2
    Last Post: 08-31-2009, 01:50 AM
  2. Disabling an User Account with NETAPI32
    By Jose Rodz in forum VB Classic
    Replies: 0
    Last Post: 10-08-2002, 10:01 AM
  3. Script for scrolling
    By Mark in forum Web
    Replies: 3
    Last Post: 08-30-2001, 12:45 PM
  4. Replies: 0
    Last Post: 11-16-2000, 05:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center