Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
I have an application where I have to print many (could be up to 1500) RTF
files. I would like to create the Word commands in an ASCII text file using Quickbasic and then run these commands in Word - is this possible - will Word accept an ASCII text macro file? The commands, for example would be: Open file1.rtf; Print; Clear Open file2.rtf; Print; Clear Open file3.rtf; Print; Clear ...etc, etc |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
You seem to be labouring under some misconceptions.
1. You can create a macro in Word (using Word VBA) that will print your 1500 RTF files. This is simple to the point of trivial. You will find sample code in a squillion places on the net. Rather than creating your instructions as a list of files, it's simpler to point to the folder(s) containing the files, then iterate them. Total of about 10 lines of code for your entire 1500 file corpus. 2. You can create macros as text files, then import those into Word. But this is quite tricky. Why do you want to do this? 3. WordBasic was abandoned long ago. There is still 'sort of' backward compatability supporting it, but there's absolutely no point creating anything new using it. Word has used VBA since W97. Where does QuickBasic come in? "Dennis P." Dennis wrote in message ... I have an application where I have to print many (could be up to 1500) RTF files. I would like to create the Word commands in an ASCII text file using Quickbasic and then run these commands in Word - is this possible - will Word accept an ASCII text macro file? The commands, for example would be: Open file1.rtf; Print; Clear Open file2.rtf; Print; Clear Open file3.rtf; Print; Clear ...etc, etc |
#3
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
The problem is that the file names are generated randomly but I need to print
them in a specified sorted order. That's why I wanted to generate the commands from a file list using quick basic or the commands could also be generated from a database that we use (DOS). The second problem is I know quick basic but don't know VBA so it's not trivial for me. Anyways I thought it might be easy to write an ascii script and then import it into Word and run it - I'm pretty sure WordPerfect allows this. Dennis P. "Jezebel" wrote: You seem to be labouring under some misconceptions. 1. You can create a macro in Word (using Word VBA) that will print your 1500 RTF files. This is simple to the point of trivial. You will find sample code in a squillion places on the net. Rather than creating your instructions as a list of files, it's simpler to point to the folder(s) containing the files, then iterate them. Total of about 10 lines of code for your entire 1500 file corpus. 2. You can create macros as text files, then import those into Word. But this is quite tricky. Why do you want to do this? 3. WordBasic was abandoned long ago. There is still 'sort of' backward compatability supporting it, but there's absolutely no point creating anything new using it. Word has used VBA since W97. Where does QuickBasic come in? "Dennis P." Dennis wrote in message ... I have an application where I have to print many (could be up to 1500) RTF files. I would like to create the Word commands in an ASCII text file using Quickbasic and then run these commands in Word - is this possible - will Word accept an ASCII text macro file? The commands, for example would be: Open file1.rtf; Print; Clear Open file2.rtf; Print; Clear Open file3.rtf; Print; Clear ...etc, etc |
#4
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Hi ?B?RGVubmlzIFAu?=,
Anyways I thought it might be easy to write an ascii script and then import it into Word and run it - I'm pretty sure WordPerfect allows this. You can write a macro in a text editor, then import it into Word VB Editor, but I can't imagine why you'd want to. All the Intellisense support that helps you write the correct syntax would be missing. And if you don't know VBA then you'd sure need all the support you can get. Being able to physcially type code doesn't mean you know what you have to type... The problem is that the file names are generated randomly but I need to print them in a specified sorted order. That's why I wanted to generate the commands from a file list using quick basic or the commands could also be generated from a database that we use (DOS). It would be possible to generate a list as a text file that a Word macro can use to print documents (get the file names for the print command). But you can't use text file commands in Word VBA for printing Word documents, you'd have to use Word VBA. I recommend the word.vba.beginners group if you want to pursue this. Possibly, you could write a batch file that uses command lines. I'm pretty sure it's possible to use the command line + DDE to print a document (equivalent of right-click and choosing Print in Windows Explorer), but I don't know the syntax. Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Word should catalog misspelled words to study. | Microsoft Word Help | |||
take yet another lesson from wordperfect "reveal codes" | Microsoft Word Help | |||
manipulating/cutting/pasting text out of a text box | Microsoft Word Help | |||
Macro for Letter Settings Help | New Users | |||
Macros - Keyboard Commands | Microsoft Word Help |