Visual Basic Customization
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Default Printer
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
229 Views, 3 Replies
04-11-2010 04:57 AM
How to get default printer's name ?
Re: Default Printer
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-16-2010 02:35 AM 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.
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.
Re: Default Printer
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-17-2010 11:36 PM 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 .
Re: Default Printer
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
04-18-2010 12:54 AM 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}
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}
---------------------------

“We don’t have a snowball’s chance in a blast furnace of surviving this attack unless every one of our units gets into the fight right now!”

“We don’t have a snowball’s chance in a blast furnace of surviving this attack unless every one of our units gets into the fight right now!”

