Printing Extra Pages to PDF

  • Follow


Im using the following code to print a FORM to PDF

Private Sub PrtPDF()
    Dim strAppendix As String
    Dim X      As Printer
    For Each X In Printers
        If (X.DeviceName = "Adobe PDF") Then

            ' Set printer as system default.
            Set Printer = X
            ' Stop looking for a printer.
            Exit For
        End If
    Next

    Me.Text71.SetFocus

    Me.Caption = Text71.Text

    DoCmd.PrintOut acSelection

I prints the PDF fine, but with 3 extra pages. I have checked the Height and 
Width of the form, and all is fine - 8 x 11

What am I missing? 

0
Reply Dave 12/12/2009 7:46:54 PM

Did you allow for the margins?
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Dave Seeger" <seeger.dave@gmail.com> wrote in message 
news:OybyVP2eKHA.2164@TK2MSFTNGP02.phx.gbl...
> Im using the following code to print a FORM to PDF
>
> Private Sub PrtPDF()
>    Dim strAppendix As String
>    Dim X      As Printer
>    For Each X In Printers
>        If (X.DeviceName = "Adobe PDF") Then
>
>            ' Set printer as system default.
>            Set Printer = X
>            ' Stop looking for a printer.
>            Exit For
>        End If
>    Next
>
>    Me.Text71.SetFocus
>
>    Me.Caption = Text71.Text
>
>    DoCmd.PrintOut acSelection
>
> I prints the PDF fine, but with 3 extra pages. I have checked the Height 
> and Width of the form, and all is fine - 8 x 11
>
> What am I missing? 


0
Reply Arvin 12/12/2009 11:24:30 PM


1 Replies
396 Views

(page loaded in 0.064 seconds)


Reply: