Home > error 5142 > error 5142 word

Error 5142 Word

be down. Please try the request again. Your cache administrator is webmaster. Generated Mon, 10 Oct 2016 04:00:17 GMT by s_ac15 (squid/3.5.20)

the following code together from a little research: Dim AppWord As Word.Application Set AppWord = CreateObject("Word.Application.8") AppWord.Visible = True Set mydoc = Documents.Open(Filename:="file_path", ReadOnly:=True) Application.ActivePrinter = "printer" With AppWord .ActiveDocument.PrintOut Background:=False .Quit SaveChanges:=False End With Set AppWord = Nothing It keeps choking at the print stage ".ActiveDocument.PrintOut Background:=False" with the following error: Run-time error '5142': Windows cannot print due to a problem with the current printer setup. Prior to this point in the code it has printed an Excel tab http://answers.microsoft.com/en-us/windows/forum/windows_7-performance/cannot-print-from-printer-error-run-time-error/d0bd89da-5f06-41b7-b695-9938552ad122 to this printer. Does anyone have any ideas what is happening or how to fix it? Rick_G04-03-2010, 09:59 AMI got your code to work, but I had to make a few changes: I always use "Option Explicit", which helps avoid simple typos in variable names. I made the new document (mydoc) belong to the AppWord instance. If you already http://www.actuarialoutpost.com/actuarial_discussion_forum/archive/index.php/t-189418.html have Word open, then changes to AppWord would not affect the new document. I had to use the MsgBox to get the correct "name" for the printer. Then I commented that line out. I also modify the active printer that belongs to the AppWord instance. Your code was modifying the Excel printer definition. Option Explicit Dim AppWord As Word.Application Set AppWord = CreateObject("Word.Application.8") AppWord.Visible = True Dim mydoc As Word.Document Set mydoc = AppWord.Documents.Open(Filename:="E:\Data\junk.doc", ReadOnly:=True) 'MsgBox "active printer", , Application.ActivePrinter AppWord.ActivePrinter = "HP 4300 PS no duplex on NE05:" With AppWord .ActiveDocument.PrintOut Background:=False .Quit SaveChanges:=False End With Set AppWord = Nothing Kenny04-03-2010, 11:31 AMThanks for the help Rick. It compiles now. Word opens and closes, but it doesn't actually print. I might try a different printer, but I did use your message box to verify I had the correct name. Any other thoughts? Kenny04-05-2010, 07:29 PMIt is working now. I'm not entirely sure what I did but the above code is essentially what I am using. Kenny04-06-2010, 11:01 AMMore problems today. The program is basically running thro

Join INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated http://www.tek-tips.com/viewthread.cfm?qid=422082 SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is https://www.amyuni.com/forum/viewtopic.php?f=2&t=307 forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown error 5142 MediaWiki reStructuredText code below into your site. HP Printers Forum at Tek-Tips HomeForumsServer RackPrintersHP Printers Forum Runtime Error 5142 thread697-422082 Forum Search FAQs Links MVPs Runtime Error 5142 Runtime Error 5142 kippy13 (IS/IT--Management) (OP) 6 Dec 02 04:54 Hi,A user in the Office recently had issues printing. He was unable to print at all after being able to print without any problems to the same printer.He got a runtime error(Numbered error 5142 word above) when trying to print a word document to a particular printer.After this he tried printing from various applications all with the same runtime error.I decided to deleted the printer and try to reinstall it. When I tried to reinstall it it told me that the printer was no longer attached to the server and it could not reconnect to it. I could ping the printer fine and no one else had issues printing to it.As a second best solution I attached him to another printer but he cant print to that either. There are no error messages it just doesn't print.He is running windows 2000 with Novell client 4.8 SP3.Can anyone help me on this one as I hope I dont have to ghost the machine again. Red Flag This Post Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework. Cancel Red Flag SubmittedThank you for helping keep Tek-Tips Forums free from inappropriate posts.The Tek-Tips staff will check this out and take appropriate action. Close Reply To This Thread Posting in the Tek-Tips forums is a member-only feature. Click Here to join Tek-Tips and talk with other members! Resources Join | Indeed Jobs | Advertise Copyright &cop

FAQ Login Information The requested topic does not exist. Board index The team • Delete all board cookies • All times are UTC - 4 hours Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

 

Related content

error 5142 printing

Error Printing p Symptoms When attempting to print a Guard Plus report you receive the following error Windows cannot print due to a problem with the current printer setup Print Preview works normally Cause The system default printer is unavailable Problems with the printer driver Registry entries or other printer files Resolution Verify that the system default printer is online and functional Refer to Microsoft KBarticle for more information about this error Set a different printer as the system default Close and reopen Guard Plus and try to print the report again Copyright TimeKeeping Systems Inc Open topic with navigation