DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  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 10: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, 12:50 AM
  2. Disabling an User Account with NETAPI32
    By Jose Rodz in forum VB Classic
    Replies: 0
    Last Post: 10-08-2002, 09:01 AM
  3. Script for scrolling
    By Mark in forum Web
    Replies: 3
    Last Post: 08-30-2001, 11:45 AM
  4. Replies: 0
    Last Post: 11-16-2000, 04:34 PM

Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links