Results 1 to 8 of 8
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Printing from Word (Word 2000)

    Could you post the macro code (in an attachment if the code is long)?

  2. #2
    Star Lounger
    Join Date
    Apr 2003
    Location
    Edinburgh, Midlothian, United Kingdom
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Printing from Word (Word 2000)

    Edited by HansV to replace Word attachment with the screenshot it contained

    With some documents we get this error when trying to print using macros - can anyone tell me what it means?

    Thanks
    Attached Images Attached Images
    • File Type: png x.PNG (3.7 KB, 0 views)

  3. #3
    Star Lounger
    Join Date
    Apr 2003
    Location
    Edinburgh, Midlothian, United Kingdom
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing from Word (Word 2000)

    Sub Print_Deed()
    '
    ' Print_Deed Macro
    ' Macro recorded 08/03/2006 by Carolyn Kerr
    '
    With ActiveDocument.PageSetup
    .LineNumbering.Active = False
    .FirstPageTray = 257
    .OtherPagesTray = 257
    End With
    Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
    wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
    Collate:=False, Background:=True, PrintToFile:=False, PrintZoomColumn:=0, _
    PrintZoomRow:=0, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0
    End Sub

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Printing from Word (Word 2000)

    If you recorded this macro on a PC with another default printer than on the PC where it is run, the value 257 for FirstPageTray and OtherPagesTray may not be valid - it is not one of the standard tray numbers, but a printer-specific number. Do you need to set the printer trays in the macro? If not, try removing the lines setting printer trays.

  5. #5
    Star Lounger
    Join Date
    Apr 2003
    Location
    Edinburgh, Midlothian, United Kingdom
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing from Word (Word 2000)

    I dont think thats the problem - it works fine 99% of the time - then with certain docs it doesnt work. The certain docs may be old WordPerfect styles that have been converted - do you think that would be a problem?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Printing from Word (Word 2000)

    I don't know. What happens if you simplify the macro to

    Sub Print_Deed()
    '
    ' Print_Deed Macro
    ' Macro recorded 08/03/2006 by Carolyn Kerr
    '
    With ActiveDocument.PageSetup
    .LineNumbering.Active = False
    .FirstPageTray = 257
    .OtherPagesTray = 257
    End With
    Activedocument.PrintOut
    End Sub

  7. #7
    Star Lounger
    Join Date
    Apr 2003
    Location
    Edinburgh, Midlothian, United Kingdom
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printing from Word (Word 2000)

    Still doesnt work.

    I am going to try retyping the style from fresh and see what happens

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Printing from Word (Word 2000)

    Try opening the global template so that when you get the error, the Debug button becomes enabled. Is the problem line the .PrintOut line, or one of the other lines? If it's in the page setup, could the document be protected? (Actually, I think that gives a different error, but I can't recall...)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •