OberonPlace.com Forums

OberonPlace.com Forums (http://forum.oberonplace.com/index.php)
-   CorelDRAW/Corel DESIGNER VBA (http://forum.oberonplace.com/forumdisplay.php?f=16)
-   -   I need print select object with my printer and my parameters. (http://forum.oberonplace.com/showthread.php?t=1417)

ajacques 18-03-2006 00:45

I need print select object with my printer and my parameters.
 
Please code
I need print select object with my printer and my parameters.
I wont paste code with properties my printer (driver - trotec.dll)

Sub Print_Trotec()
Dim OrigSelection As ShapeRange
Set OrigSelection = ActiveSelectionRange
With ActiveDocument.PrintSettings
.SelectPrinter "TrotecEngraver v8.0.5.2"
.PrintRange = prnSelection
End With
ActiveDocument.PrintOut
End Sub


Sorry, I'm from Poland :)
ajacques

ddonnahoe 20-03-2006 08:09

Here is a snippet of code from one of my macros that you may be able to "tweak" for your needs...
Code:

If SendToLaser.Value = True Then
        Dim prn2 As Printer
        Dim j As Long
   
        Set prn2 = Nothing
        For j = 1 To Printers.Count
          If Printers(j).Name = "GCC Elite XL 20/600 v3.31" Then
                Set prn2 = Printers(j)
                Exit For
            End If
        Next j
   
        If prn2 Is Nothing Then
            MsgBox "Printer not found", vbCritical
        Else
          Set ActiveDocument.PrintSettings.Printer = prn2
          ActiveDocument.PrintSettings.Copies = 1
        End If

        ActiveDocument.PrintSettings.Copies = 1
        ActiveDocument.PrintSettings.PageRange = "1"
        ActiveDocument.PrintOut
    End If

There is a checkbox on my form. That is why the code starts with "If SendToLaser.Value = True Then"


All times are GMT -5. The time now is 14:35.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com