![]() |
|
|||
|
Hello,
I have about two hundred individual RTF files to print from an XP host. Word 2000 doesn't seem to have this feature, so I'm looking for a way to print those RTF files from an ActivePython script. Would someone have some working code handy? Thank you. |
|
|||
|
nospam@nospam.com wrote:
> Hello, > > I have about two hundred individual RTF files to print from an > XP host. Word 2000 doesn't seem to have this feature, so I'm looking > for a way to print those RTF files from an ActivePython script. Would > someone have some working code handy? > > Thank you. Sure it does, just not the way you think. - Click on Start-Settings-Printer and Faxes - Double-click the printer you want to print to - Open folder where your 200 RTF files are stored. - Drag and drop the file on to the printer window and your machine will launch and print each of thes in Word. -Larry |
|
|||
|
On Jun 4, 12:26 pm, "nos...@nospam.com" <Gilles@> wrote:
> Hello, > > I have about two hundred individual RTF files to print from an > XP host. Word 2000 doesn't seem to have this feature, so I'm looking > for a way to print those RTF files from an ActivePython script. Would > someone have some working code handy? > > Thank you. The code below will print one file from your current directory to the default printer. You should be able to tweak it to your needs. import sys import os from win32com.client import Dispatch MYDIR = os.getcwd() + '/' myWord = Dispatch('Word.Application') myWord.Visible = 1 # comment out for production myDoc = myWord.Documents.Open(MYDIR + sys.argv[1]) myDoc.PrintOut() myDoc.Close() |
|
|||
|
On Wed, 04 Jun 2008 11:37:30 -0500, Larry Bates
<larry.bates@websafe.com`> wrote: >Sure it does, just not the way you think. Thanks guys, that did it. I had to print in smaller batches because 200 in one shot caused Word to crash, but I got the job done. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|