Specifying Manual Feed

  • Thread starter Thread starter LGC
  • Start date Start date
L

LGC

I have a report that prints to manual fed labels. Recently, for some users, the report began to print to the plain paper tray. I have a Word macro that allows the user to select which tray to print to. My questions is: Can I use the same mechanism in an Access report as the one I use in word to programmatically select the manual paper tray? I don't find a comparable report property to Word's ActiveDocument.PageSetup.FirstPageTray. I've copied the Word code below for reference (Watch out for word wrap).

Thanks to any suggestions.

LaVern

WORD MACRO CONTAINED IN A USER FORM:

Private Sub cmdPrint_Click()

On Error Resume Next

If optLetterhead = True Then

ActiveDocument.PageSetup.FirstPageTray = 1259
ActiveDocument.PageSetup.OtherPagesTray = 1257

Else

If cboFirstPage = "" Then
MsgBox "Please make your first page selection.", vbExclamation + vbOKOnly _
, "TRAY NOT SELECTED"
Exit Sub
End If
Select Case cboFirstPage.ListIndex
Case 0
ActiveDocument.PageSetup.FirstPageTray = 263
Case 1
ActiveDocument.PageSetup.FirstPageTray = 258
Case 2
ActiveDocument.PageSetup.FirstPageTray = 259
End Select

If cboOtherPages = "" Then
ActiveDocument.PageSetup.OtherPagesTray = ActiveDocument.PageSetup.FirstPageTray
Else
Select Case cboOtherPages.ListIndex
Case 0
ActiveDocument.PageSetup.OtherPagesTray = 263
Case 1
ActiveDocument.PageSetup.OtherPagesTray = 258
Case 2
ActiveDocument.PageSetup.OtherPagesTray = 259
End Select
End If
End If

ActivePrinter = "\\IBMCAPP\IBIS P&C 4300 PS on NE04:"
ActiveDocument.PrintOut

Unload Me

End Sub
 
Lavern:

Access does not have a similar object like Active Document for reports. The
closest thing you can get to is the Printer object (Access Xp, 2003) of a
report which does support specifying the output location (i.e. bin) In
Access 2000 and below you have to set this using the prtDevMode property.
(See our web site under Code and Design Tips / Reports for a function to
call that will set your report to a specific tray before its output.) All
changes must be done in design mode and can't be set while the report is
running.

HTH
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

I have a report that prints to manual fed labels. Recently, for some users,
the report began to print to the plain paper tray. I have a Word macro that
allows the user to select which tray to print to. My questions is: Can I
use the same mechanism in an Access report as the one I use in word to
programmatically select the manual paper tray? I don't find a comparable
report property to Word's ActiveDocument.PageSetup.FirstPageTray. I've
copied the Word code below for reference (Watch out for word wrap).

Thanks to any suggestions.

LaVern

WORD MACRO CONTAINED IN A USER FORM:

Private Sub cmdPrint_Click()

On Error Resume Next

If optLetterhead = True Then

ActiveDocument.PageSetup.FirstPageTray = 1259
ActiveDocument.PageSetup.OtherPagesTray = 1257

Else

If cboFirstPage = "" Then
MsgBox "Please make your first page selection.", vbExclamation +
vbOKOnly _
, "TRAY NOT SELECTED"
Exit Sub
End If
Select Case cboFirstPage.ListIndex
Case 0
ActiveDocument.PageSetup.FirstPageTray = 263
Case 1
ActiveDocument.PageSetup.FirstPageTray = 258
Case 2
ActiveDocument.PageSetup.FirstPageTray = 259
End Select

If cboOtherPages = "" Then
ActiveDocument.PageSetup.OtherPagesTray =
ActiveDocument.PageSetup.FirstPageTray
Else
Select Case cboOtherPages.ListIndex
Case 0
ActiveDocument.PageSetup.OtherPagesTray = 263
Case 1
ActiveDocument.PageSetup.OtherPagesTray = 258
Case 2
ActiveDocument.PageSetup.OtherPagesTray = 259
End Select
End If
End If

ActivePrinter = "\\IBMCAPP\IBIS P&C 4300 PS on NE04:"
ActiveDocument.PrintOut

Unload Me

End Sub
 
Back
Top