Quantcast
Channel: Word for Developers forum
Viewing all articles
Browse latest Browse all 4350

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

$
0
0

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


Viewing all articles
Browse latest Browse all 4350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>