d, Selection succeeded! End If End If End If ' Change the appropriate member in the DevMode. ' In this case, you want to change the form name. pDevMode.dmFormName = FormName & Chr(0) ' Must be NULL terminated! ' Set the dmFields bit flag to indicate what you are changing. pDevMode.dmFields = DM_FORMNAME ' Copy your changes back, then update DEVMODE. Call CopyMemory(aDevMode(1), pDevMode, Len(pDevMode)) nSize = DocumentProperties(MyhWnd, PrinterHandle, PrinterName, _ aDevMode(1), aDevMode(1), DM_IN_BUFFER Or DM_OUT_BUFFER) nSize = ResetDC(hPrtDC, aDevMode(1)) ' Reset the DEVMODE for the DC. ' Close the handle when you are finished with it. ClosePrinter (PrinterHandle) ' Selection Succeeded! But was Form Added? If SelectForm <> FORM_ADDED Then SelectForm = FORM_SELECTED Else SelectForm = FORM_NOT_SELECTED ' Selection Failed! End If End Function Public Sub PrintTest() ' Print two test pages to confirm the page size. Printer.Print "Top of Page 1." Printer.NewPage ' Spacing between lines should reflect the chosen page height. Printer.Print "Top of Page 2. - Check the page Height (Length.)" Printer.EndDoc MsgBox "Check Printer " & Printer.DeviceName, vbInformation, "Done!" End Sub