Hi,
I want to specify another printer direct from VB, not via the printersetup method.
I want to use the selectprinter-method, sth I used before in the cr6 also and it is specified in the pdf you send me ! The only thing he isn't doing is
that he doesn't take the brother, but he still is taking the hp, which is actualy my default printer. Have I forgotten something ?
Thx in advance,
Pedro...
Private Sub Cmd_PrintHL_Click()
Dim hulp As String
Dim hulp2 As String
Dim test As Long
Dim p As Printer
Set Appn = CreateObject("CrystalRunTime.application"
Set cReport = Appn.OpenReport("c:\commdc\test.rpt"
hulp2 = "Testje van mijn eigen"
cReport.FormulaFields(1).Text = Chr(39) & hulp2 & Chr(39) ' "test =" & Chr(39) & hulp2 & Chr(39)
For Each p In Printers
MsgBox p.DeviceName & " " & p.DriverName & " " & p.port
DoEvents
Next
'cReport.SelectPrinter "\\BEETHOVEN\HP LaserJet 4000 PCL 5e", "winspool", "Ne00:"
cReport.SelectPrinter "\\NT-SERVER\Brother HL-1260", "winspool", "Ne01:"
If Chk_PrintSetup = 1 Then
cReport.PrinterSetup (test)
End If
cReport.PrintOut
Set cReport = Nothing
End Sub
I want to specify another printer direct from VB, not via the printersetup method.
I want to use the selectprinter-method, sth I used before in the cr6 also and it is specified in the pdf you send me ! The only thing he isn't doing is
that he doesn't take the brother, but he still is taking the hp, which is actualy my default printer. Have I forgotten something ?
Thx in advance,
Pedro...
Private Sub Cmd_PrintHL_Click()
Dim hulp As String
Dim hulp2 As String
Dim test As Long
Dim p As Printer
Set Appn = CreateObject("CrystalRunTime.application"
Set cReport = Appn.OpenReport("c:\commdc\test.rpt"
hulp2 = "Testje van mijn eigen"
cReport.FormulaFields(1).Text = Chr(39) & hulp2 & Chr(39) ' "test =" & Chr(39) & hulp2 & Chr(39)
For Each p In Printers
MsgBox p.DeviceName & " " & p.DriverName & " " & p.port
DoEvents
Next
'cReport.SelectPrinter "\\BEETHOVEN\HP LaserJet 4000 PCL 5e", "winspool", "Ne00:"
cReport.SelectPrinter "\\NT-SERVER\Brother HL-1260", "winspool", "Ne01:"
If Chk_PrintSetup = 1 Then
cReport.PrinterSetup (test)
End If
cReport.PrintOut
Set cReport = Nothing
End Sub