Results 1 to 7 of 7

Thread: Why doesn't Wordobject print????

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2002
    Location
    Netherlands
    Posts
    39

    Unhappy Why doesn't Wordobject print????

    I hope somebody can help me with this one;

    I have the following code:

    Code:
            oWord = CreateObject("Word.Application")
            oWord.Visible = True
            WordIntface.rewrite_text()
            oWord.ActiveDocument.PrintOut()
            oWord.Quit()
            oWord = Nothing
    where WordIntface is a webmethod to replace specific text in the document I opened...

    After that I want to print with the method PrintOut.

    I get no errors, I get no warnings, everything just seems fine... until I walk to the printer to find out nothing has been printed

    What am I doing wrong

    Thanx for the help people!

    Dozo

  2. #2
    Lively Member
    Join Date
    Aug 2002
    Location
    outerspace
    Posts
    126
    does it bring up the print driver program asking u to choose what printer or anything
    "All those who wonder are not lost" -j.r.r tolkien

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2002
    Location
    Netherlands
    Posts
    39

    it doesn't...

    The apsx page reloads, but nothing pops up or anything.

    it is busy, it passes the code and then it just sits there waiting for the next order of the user to interact with the aspx page...

    And nothing rolls out of the printer....

  4. #4

    Thread Starter
    Member
    Join Date
    Aug 2002
    Location
    Netherlands
    Posts
    39

    Unhappy Does no one have the answer?

    Nobody has the answer to this????


  5. #5
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    Word prints on the background by default. I think you quit word before printing has even started.

    change:
    oWord.ActiveDocument.PrintOut()
    to:
    oWord.ActiveDocument.PrintOut(Background:=False)

    I think this will solve your problem.

  6. #6

    Thread Starter
    Member
    Join Date
    Aug 2002
    Location
    Netherlands
    Posts
    39

    Thanx

    I am 1 step closer to the printjob now, thnx to you.

    But it failed to print due to printersettings which were not set. But if I omit everthing it should use the default, shouldn't it?

    Dozo

  7. #7

    Thread Starter
    Member
    Join Date
    Aug 2002
    Location
    Netherlands
    Posts
    39

    Anyone?


Posting Permissions

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



Click Here to Expand Forum to Full Width