Calling all AC2002 Guru's - Changing Printer and Paper Size at Runtime from MDE...

B

Bill D

Hello All,

My problem is this. I distribute my app as an MDE. I never know what type
of printer the end-user might have.
I have a wide range of reports I am trying to run. Some of the reports
print to various size labels.

I am coming accross a problem when users try printing to some of these small
single label roll feed type printers (a la DYMO).

I am using code like this along with a UI form to allow the user to select
settings and sizes.

With Reports(Me.cboBarcodeLabelType.Value).Printer 'set all print options
.LeftMargin = txtLeftMarg.Value * UnitsMultiplier ' multiplier for
twips to inches or cm.
.RightMargin = txtRightMarg.Value * UnitsMultiplier
.TopMargin = Me.txtTopMarg.Value * UnitsMultiplier
.BottomMargin = Me.txtBottomMarg.Value * UnitsMultiplier
.ItemsAcross = txtNmbrOfColumns.Value
Select Case cboItemLayout
Case "Down, then Across" ';"Across, then Down"
.ItemLayout = acPRVerticalColumnLayout
Case "Across, then Down"
.ItemLayout = acPRHorizontalColumnLayout
End Select
.DefaultSize = Me.chkDefaultSize.Value
If Not chkDefaultSize Then
.ItemSizeWidth = txtColWidth.Value * UnitsMultiplier
.ItemSizeHeight = txtColHeight.Value * UnitsMultiplier
End If
.ColumnSpacing = txtColSpacing.Value * UnitsMultiplier
.RowSpacing = Me.txtRowSpacing.Value * UnitsMultiplier
.DataOnly = True
.Copies = txtCopies.Value
.PrintQuality = ConvQualityTextToPtr(Me.cboQuality.Value)
.PaperBin = ConvBinTextToPtr(Me.cboBin.Value)
.PaperSize = ConvPaperSizeTextToPtr(Me.cboPaperSize.Value)
.Orientation = ConvOrientationTextToPtr(Me.cboOrientation.Value)
End With

The PaperSize property only accepts certain constants. Here are some:
Select Case prtText

Case "10in. x 14in."
ConvPaperSizeTextToPtr = acPRPS10x14
Case "11in. x 17in."
ConvPaperSizeTextToPtr = acPRPS11x17
Case "A3"
ConvPaperSizeTextToPtr = acPRPSA3
Case "A4"
ConvPaperSizeTextToPtr = acPRPSA4
Case "User Defined"
ConvPaperSizeTextToPtr = acPRPSUser

AC2002 allows changeing of these printer values in preview mode.
I have tried tried changing the "Application.Printer " settings as well
as the "Report.printer" settings.
I am getting inconsistent results. It seems like the report is reverting
back to the default printer settings.
rather than what I set it to with the above code.

What does Access use if the "PaperSize" property is set to "acPRPSUser"
(user-defined)?
Is it the default printers paper size or what ?


I really need a good solution for printing these small labels from these
single label roll feed printers.
Any and all ideas welcome.


Any help would be greatly appreciated.

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top