Originally Posted by
Helivwe
The code
<< Application.ActivePrinter = "Microsoft Print to PDF" >>
gives error 1004 (Method 'activeprinter' of object '_Application' failed
Both applications (Excel and Word) have the same commands when it comes to setting/reading the active printer. They differ only in the way they are called.
If you ran in Excel code
then it applies to Excel. And in Excel, to set the active printer, in addition to the name of the printer, you need to specify the name of the port. In Word, the port name is not required.
Originally Posted by
Helivwe
I just tried to deactivate the wifi connection. This works perfect.
...But I have not the knowledge how to de- and reactivate the wifi connection with vba
Try it, but I do not guarantee success.
Artik
Bookmarks