Results 1 to 4 of 4
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print - output = Print to file

    HIya

    In Word 97 - VBA
    I'm writing code to print a document
    & the output is print to file.
    ie generate a postscript file

    I'm getting error messages.
    Has anyone doe this or do you have any code which works?
    Thanks in advance - Diana

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print - output = Print to file

    Well, first you need to have a postscript printer driver (and therefore an actual printer object) installed on the PC. Then you need to change to that printer (if it's not the default). Then you just indicate "print to file" and give the beast a filename. Using the dialog you should make some progress with this:

    <pre>With Dialogs(wdDialogFilePrint)
    .Printer = "ZooThePostScriptPrinter on MyPC"
    .PrToFileName = "c:thebeast"
    .PrintToFile = True
    .Execute
    end with
    </pre>

    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print - output = Print to file

    Hi Kevin
    When user logged onto terminal server

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print - output = Print to file

    Hey, maybe it's just this:

    >>OutputFileName:="strPostScriptFile",

    That will print to a file named strPostScriptFile in the default (most likely DOS) folder. That folder might be a read only folder; in that case your file cannot be written to.

    What you mean is this, correct?: (no quotes)

    OutputFileName:=strPostScriptFile,
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Posting Permissions

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