Results 1 to 3 of 3
  1. #1

    ActiveDocument.Printout question (97 SR2)

    I have been asked to create a couple of files to assist a customer with filling in a pre-printed form. I have to use Excel '97 for data entry and Word '97 to do the printing.

    I have the data entry going fine. When the customer is done they click a button. The macro then creates a separate excel spreadsheet for a mail-merge document. This excel macro then starts up Word and has word open up a shell document.

    Word opens up this shell, merges it with the data that the customer has entered, and prints out the data in the right places on the form. Except when I try to automate it.

    If I open the document by itself, and do the steps manually, it all works exactly as I expect. When I go to print I get a messsage about the print area being outside the range of the borders. I click 'ok' and it prints fine. And lines up perfectly.

    When I try to automate this with VBA it doesn't want to work!

    When the document is opened, it asks about whether or not you want macros enabled. I click enable macros. It then opens the shell, does the merge, does the print, and closes itself down.

    Except the print never comes out of the printer, and I was never asked about the print area / margin error.

    There is no error on the screen at all. I am trying to print the document with ActiveDocument.Printout, and I can post the entire macro if that would help.

    Can someone please assist me with this ? This is driving me nuts.

  2. #2
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Sun Prairie, Wisconsin, Wisconsin, USA
    Thanked 128 Times in 123 Posts

    Re: ActiveDocument.Printout question (97 SR2)

    It might work better if you started it in Word and pulled the data in from Excel. Among other things, this might avoid the macro warning.

    Another thought is printing to a file and then copying the file to the printer.

    You may want to run your question on the VB/VBA forum.
    Charles Kyle Kenyon
    Madison, Wisconsin

  3. #3

    Re: ActiveDocument.Printout question (97 SR2)

    I will post on the VBA forum as well.

Posting Permissions

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