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


Reply With Quote


Bookmarks