J
Jim
Hi folks,
I'm a newbee, so please bear with me...
-*- Office 2002, Windows XP -*-
I have a long document typed into word with this structure;
Q"tabchar"Sentence goes here. If this sentence is longer than 60
characters it wraps to the next line. However, I have to save this
document as plain ASCII text and need the lines to all line up using that
tab. A"tabchar"Some answer to the above question
I need to save this document as ASCII text and have the sentences/paragraphs
all line up with tabs like this;
Q"tabchar"Sentence goes here. If this sentence is longer than 60
"tabchar"characters it wraps to the next line. However, I have to
"tabchar"save this document as plain ASCII text and need the lines
"tabchar"to all line up using that tab.
Currently I have to enter the tabs manually any time the sentence/paragraph
wraps. This can be tedious to say the least...
Here is what I think needs to happen.
* For each paragraph, if the paragraph is longer than 60 characters, find
the "space" character closest, but not over 60 charcters, Delete the space
and insert, in it's place, a CR and TAB.
Too bad one can't write VB code like that...
If I record a macro and clean it up a bit this is what I get;
Selection.TypeBackspace
Selection.TypeParagraph
Selection.TypeText Text:=vbTab
How do I wrap this in code to loop through the document's paragraphs,
counting the characters, finding the correct space between words, deleting
the space and inserting the CR and TAB?
Thanks for any help,
Jim
I'm a newbee, so please bear with me...
-*- Office 2002, Windows XP -*-
I have a long document typed into word with this structure;
Q"tabchar"Sentence goes here. If this sentence is longer than 60
characters it wraps to the next line. However, I have to save this
document as plain ASCII text and need the lines to all line up using that
tab. A"tabchar"Some answer to the above question
I need to save this document as ASCII text and have the sentences/paragraphs
all line up with tabs like this;
Q"tabchar"Sentence goes here. If this sentence is longer than 60
"tabchar"characters it wraps to the next line. However, I have to
"tabchar"save this document as plain ASCII text and need the lines
"tabchar"to all line up using that tab.
Currently I have to enter the tabs manually any time the sentence/paragraph
wraps. This can be tedious to say the least...
Here is what I think needs to happen.
* For each paragraph, if the paragraph is longer than 60 characters, find
the "space" character closest, but not over 60 charcters, Delete the space
and insert, in it's place, a CR and TAB.
Too bad one can't write VB code like that...
If I record a macro and clean it up a bit this is what I get;
Selection.TypeBackspace
Selection.TypeParagraph
Selection.TypeText Text:=vbTab
How do I wrap this in code to loop through the document's paragraphs,
counting the characters, finding the correct space between words, deleting
the space and inserting the CR and TAB?
Thanks for any help,
Jim