... oder aus der Registry auslesen
Function f_sW32GetDefaultPrinter() As String
Dim oWShell As Variant
Dim sRegKey As String
Dim sPrinter As String
Dim vTmp As Variant
Set oWShell = CreateObject( "WScript.Shell" )
sRegKey = "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device"
sPrinter = oWShell.RegRead( sRegKey )
'liefert sowas zurück: \\XXX14600\xxxdr4027e,winspool,Ne07:
'jetzt den Printer-Namen extrahieren:
vTmp = Split( sPrinter, "," ) '(0)
sPrinter = vTmp(0)
f_sW32GetDefaultPrinter = sPrinter
'WScript.Echo strPrinter
End Function
hth
Thomas