VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Default Printer

3 REPLIES 3
Reply
Message 1 of 4
cubuscoil
444 Views, 3 Replies

Default Printer

How to get default printer's name ?
3 REPLIES 3
Message 2 of 4
Wheelie22
in reply to: cubuscoil

You mean the W default printer ?

Thats START menu, settings, printers and settings.

And there is 1 with a little black dot (wel call it a vinkie in holland).

And this is your default printer in evry software program.
Message 3 of 4
cubuscoil
in reply to: cubuscoil

Hi,Wheelie22 ! You describe a manual default printer setting. I want programmaticaly TO GET from VBA for AutoCad name of the default printer, which already was SET .
Message 4 of 4
arcticad
in reply to: cubuscoil

{code}
Private Declare Function GetProfileStringA Lib "kernel32" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long) As Long

Function DefaultPrinterInfo() As String
Dim Result As String
Dim strLPT As String * 255
Call GetProfileStringA("Windows", "Device", "", strLPT, 254)
DefaultPrinterInfo = (Split(strLPT, ",")(0))
End Function
{code}
---------------------------



(defun botsbuildbots() (botsbuildbots))

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost