|
-
Jun 6th, 2000, 11:11 PM
#1
Thread Starter
New Member
I'm using the code below to show a printer dialog, then print out the contents of a richtextbox. Although this works, the default paper size used is 'letter' whereas I want it to be 'A4'. So what I want to do is make the paper size in the properties screen of the print dialog to default to 'A4' rather than letter. How do I do this? I tried adding a "Printer.PaperSize=vbPRPSA4" before
the ShowPrinter call, but that didn't work.
Any ideas?
----- code snippet ------
CommonDialog1.CancelError = True
CommonDialog1.Flags = cdlPDReturnDC + cdlPDNoPageNums
If msg.SelLength = 0 Then
CommonDialog1.Flags = CommonDialog1.Flags + cdlPDAllPages
Else
CommonDialog1.Flags = CommonDialog1.Flags + cdlPDSelection
End If
On Error Resume Next
CommonDialog1.ShowPrinter
If Err <> 32755 Then ' if cancel wasn't selected
Printer.Print ""
Richtextbox1.SelPrint CommonDialog1.hDC
End If
Printer.EndDoc
---------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|