SEO Forums: Your seo discussion forum  
Welcome, Unregistered.
You last visited: Today at 04:23 AM
  #1 (permalink)  
Old 06-05-2008, 12:48 AM
nospam@nospam.com
Guest
 
Posts: n/a
Default [XP] Batch-print bunch of RTF files?

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.
Reply With Quote
  #2 (permalink)  
Old 06-05-2008, 12:48 AM
Larry Bates
Guest
 
Posts: n/a
Default Re: [XP] Batch-print bunch of RTF files?

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
Reply With Quote
  #3 (permalink)  
Old 06-05-2008, 12:48 AM
drobinow@gmail.com
Guest
 
Posts: n/a
Default Re: Batch-print bunch of RTF files?

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()
Reply With Quote
  #4 (permalink)  
Old 06-05-2008, 12:48 AM
nospam@nospam.com
Guest
 
Posts: n/a
Default Re: [XP] Batch-print bunch of RTF files?

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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:23 AM.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Reklamlar & Desteklenenler