Mar
Wed
17
webmaster
  • Help

    We have just upgraded from Windows ME and Works 2000 to Windows XP pro and Office XP SBE. We now have problems with some print macros.

    The macro was originally recorded to print current page from upper paper tray and a copy from the lower paper tray.

    Now both copies come from the lower tray. I have re-recorded the macro with the same result. The strange thing is that while recording the macro the correct trays are selected by the printer. But when played the macro uses the bottom tray. On examaning the macro the settings of ActiveDocument.PageSetup properties are not recorded.

    Below are the two macros. The working original and the faulty new one

    Original

    Sub Hprint1()
    '
    ' Hprint1 Macro
    ' Macro recorded 21 November 2001 by Mark Cresswell
    '
    With CommandBars("Standard")
    With .Controls("Hprint1")
    .TooltipText = "Print Current page on Headed paper and 1 copy on Plain"
    End With
    End With

    With ActiveDocument.PageSetup
    .LineNumbering.Active = False
    .Orientation = wdOrientPortrait
    .TopMargin = InchesToPoints(2)
    .BottomMargin = InchesToPoints(0.23)
    .LeftMargin = InchesToPoints(1)
    .RightMargin = InchesToPoints(1)
    .Gutter = InchesToPoints(0)
    .HeaderDistance = InchesToPoints(2.63)
    .FooterDistance = InchesToPoints(0.23)
    .PageWidth = InchesToPoints(8.27)
    .PageHeight = InchesToPoints(11.69)
    .FirstPageTray = wdPrinterUpperBin
    .OtherPagesTray = wdPrinterUpperBin
    .SectionStart = wdSectionNewPage
    .OddAndEvenPagesHeaderFooter = False
    .DifferentFirstPageHeaderFooter = False
    .VerticalAlignment = wdAlignVerticalTop
    .SuppressEndnotes = True
    .MirrorMargins = False
    .TwoPagesOnOne = False
    .GutterPos = wdGutterPosLeft
    End With
    Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _
    wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
    Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
    PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
    With ActiveDocument.PageSetup
    .LineNumbering.Active = False
    .Orientation = wdOrientPortrait
    .TopMargin = InchesToPoints(2)
    .BottomMargin = InchesToPoints(0.23)
    .LeftMargin = InchesToPoints(1)
    .RightMargin = InchesToPoints(1)
    .Gutter = InchesToPoints(0)
    .HeaderDistance = InchesToPoints(2.63)
    .FooterDistance = InchesToPoints(0.23)
    .PageWidth = InchesToPoints(8.27)
    .PageHeight = InchesToPoints(11.69)
    .FirstPageTray = wdPrinterLowerBin
    .OtherPagesTray = wdPrinterLowerBin
    .SectionStart = wdSectionNewPage
    .OddAndEvenPagesHeaderFooter = False
    .DifferentFirstPageHeaderFooter = False
    .VerticalAlignment = wdAlignVerticalTop
    .SuppressEndnotes = True
    .MirrorMargins = False
    .TwoPagesOnOne = False
    .GutterPos = wdGutterPosLeft
    End With
    Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _
    wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
    Collate:=True, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
    PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
    End Sub



    ---------------------------------New one with XP----------------------------


    Sub HPPrint1()
    '
    ' HPPrint1 Macro
    ' Macro recorded 6/27/2003 by Mark Cresswell (Silent Monkey Computer Services Ltd)
    '
    Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _
    wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
    ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
    False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
    PrintZoomPaperHeight:=0
    Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _
    wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
    ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
    False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
    PrintZoomPaperHeight:=0
    End Sub

    Any help would be appreciated


  • Since I don't have a printer with two paper trays, I can't test anything...

    Have you updated your printer driver to the latest and bestest? Check with the printer manufacturer or the windowsupdate.microsoft.com website for more information. While there, you might also want to update your version of Win XP.

    You might also want to ensure you have the latest version of Word (XP is up to SP2 with a subsequent update). Check www.microsoft.com/office.

    Finally, search support.microsoft.com for keywords such as 'word xp cannot select paper tray' (w/o the quotes). I got quite a few hits, but not knowing anything about your printer, I didn't search much further.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Cannot select paper try from macro , Please add it free.
    • edit