Re: Format a file created by FSO.CreateTextFile?
- From: "Karl E. Peterson" <karl@xxxxxxxxxx>
- Date: Mon, 27 Jul 2009 12:55:33 -0700
Ed from AZ wrote:
I've got a very long file which is a string of docs that need to be
broken out and saved as individual docs. I can do this with either
Word's Document.Add and SaveAs or by using FSO.CreateTextFile.
I have to strike a balance between two issues, or find a better
solution altogether. The docs are formatted to look right in a
smaller mono-spaced font - I use Courier New, 10 pt. The files are
saved with a .doc extension and opened in Word (either 2003 or 2007).
If I create the files with Add, it takes 5-15 seconds per file, but I
can format them so they look right when opened. If I use FSO, it's
fractions of a second per file, but the file will use the Normal
default style - often Times 12 pt - when opening.
Is there a way to add font formatting to the FSO file? Or speed up
the doc saving? Or what about creating all files by FSO, then
accessing each doc in the folder and setting font characteristics?
The files you're creating with FSO are just pure text and nothing but text. No
formatting whatsoever. That's the very definition of "text files".
Btw, there's really no good excuse for using FSO in any language that has native
file i/o built-in. FSO is for scripting languages only, and is pathetically inept
(not to mention redundant overhead) compared to the language you're using.
--
..NET: It's About Trust!
http://vfred.mvps.org
.
- Follow-Ups:
- Re: Format a file created by FSO.CreateTextFile?
- From: Ed from AZ
- Re: Format a file created by FSO.CreateTextFile?
- References:
- Format a file created by FSO.CreateTextFile?
- From: Ed from AZ
- Format a file created by FSO.CreateTextFile?
- Prev by Date: Re: Set "AutomaticallyUpdate" to "false" for all user-defined styl
- Next by Date: Re: Retaining Form Values After Unloading
- Previous by thread: Format a file created by FSO.CreateTextFile?
- Next by thread: Re: Format a file created by FSO.CreateTextFile?
- Index(es):
Relevant Pages
|