none
Getting a message "there is a printer error " when trying to print RRS feed

  • Question

  • I am trying to print in word automation from vb .Net to the user's default printer.  Sometimes everything prints ok, other times I receive the following error message:  "There is a printer error"

    It seems that if the default printer is printername on portname I get this error; but even then sometimes it works.  If the printername is \\servername\printername it seems to always work.

    I have a script that retrieves the printername, and the return value can vary between the above two examples.

    If I set the default printer on the machine to the printer that is associated with my login, it seems to work better.

    The above are just some observations; I do not really know why it works sometimes and sometimes it doesn't.

     myword.WordBasic.FilePrintSetup(Printer:=pname, DoNotSetAsSysDefault:=1) is my setup code for the printer

    Many thanks for your assistance!

    -Erik

    Wednesday, August 7, 2013 8:00 PM

Answers

  • Hello Eirk,

    Please make sure that the printer name you specify has same letter casing (upper case/lower case) as it is mentioned under the below registry key:

    "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices"

    Also, please let me know which version of Office are you using.

    -Ajay

    Thursday, August 15, 2013 7:19 PM

All replies

  • Hi Erik,

    I will consult my colleagues on this question, and it will take some time, your patience will be greatly appreciated.

    Regards,

    Jeffrey


    Jeffrey Chen
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, August 9, 2013 1:51 AM
    Moderator
  • Hello Erik,

    Are you getting the error on the below line?

    myword.WordBasic.FilePrintSetup(Printer:=pname, DoNotSetAsSysDefault:=1)

    Please share the code snippet and let us know which is the exact line of code where you are getting the error. Also, what is the value of "pname" you are using in the above line of code?

    -Ajay

    Friday, August 9, 2013 6:03 PM
  • Hi Ajay,

    Thanks for your response.  I am getting the error on that line.  pname is either

    \\servername\printername (which works) or its "printername on servername" which doesn't work.

    I may be moving in a different direction, just so you know.  I may convert the documents to PDFs and print them using a software package.

    Thanks!

    -Erik

    Sunday, August 11, 2013 5:14 PM
  • Hello Eirk,

    Please make sure that the printer name you specify has same letter casing (upper case/lower case) as it is mentioned under the below registry key:

    "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices"

    Also, please let me know which version of Office are you using.

    -Ajay

    Thursday, August 15, 2013 7:19 PM