473,564 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[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.
Jun 27 '08 #1
3 1819
no****@nospam.c om 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
Jun 27 '08 #2
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.Document s.Open(MYDIR + sys.argv[1])
myDoc.PrintOut( )
myDoc.Close()
Jun 27 '08 #3
On Wed, 04 Jun 2008 11:37:30 -0500, Larry Bates
<la*********@we bsafe.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.
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3057
by: John | last post by:
Can anyone tell me how to run a bunch of commands in the same command line window? When I do this: system("command1") system("command2") .... it opens a new window for every system call. The alternative I can think of is to write out the command to a batch file and run that, but I'm wondering if there is a better way to do it.
24
3071
by: Esmail Bonakdarian | last post by:
Hi, Is there a way to display how long a Win XP system has been up? Somewhat analogous to the *nix uptime command. Thanks, Esmail
1
2268
by: Amit Chandel | last post by:
My XP machine installed an IE patch, and it crashed my .NET app on my local machine. The resulting error is 'Server Application Unavailable' when making a request to your webSvc on IIS. If you are running Windows XP with ..NET Framework 1.0 (Development Machine) then follow the link. It has instructions on how to fix the problem. W2K...
7
10080
by: Newbillian | last post by:
Is there some way of using vba to automate the processe of joining an Access 97 security workgroup? I typed wrkgadm /? at a command prompt and it just opens the gui, so I'm not sure what the parameters are for the command or whether there really are any command line switches for it. Thank you in advance.
4
2159
by: Mike Youell | last post by:
Hi, I am trying to call an application from php. I have tried exec() and system() and even popen() all to no avail. Can an application be called if it brings up a window? The app I am calling has a command line interface, but it insists on bringing up it's standard window also.
7
21590
by: rhjaisingh | last post by:
Folks, I need to create a batch file that will do the following - Establish a DB2 instance Connect to a certain database Get data using an sql and output it to a file So, this is what I have done in my test.cmd file
27
3951
by: Julien Fiore | last post by:
Do you wand to install Pyrex on Windows ? Here is a step-by-step guide explaining: A) how to install Pyrex on Windows XP. B) how to compile a Pyrex module. Julien Fiore, U. of Geneva
1
2967
by: vikramrawal | last post by:
hi, I am using C# with MSAccess XP. I need to insert bulk of records around 10000 in MSAccess. So obviously if I inserts each record individually then it will take lot of time. By using OleDbDataAdapter and setting its UpdateBatchSize property we can insert bulk of records in single trip to database but this property is not supported for...
0
2630
by: Varan | last post by:
hai, now we are using batch file for take backup at time of start services and stop services. we need option for take database backup at time 1. System Start 2. System Shutdown using the windows sechulder, we got the solution (System Start time backup. ...
14
12781
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in case it's a question, i want to popup a messageBox or something, and bring back to the batch file the result (Yes\No question). I know how to excute...
0
7665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.