How to count numbers of character in a line

T

Thejan Mendis

Hi everybody,

I just thought somebody can help me to create a macro with following
functions.

I have some text document each has two potions

-HEAD-
..
..
..
-BODY-

---------SAMPLE----------

-DATE- 20030601
-ISSU- June 2003
-PAGE- 96
-SECT- jhhkhrthehrkht
-HEAD- Every job i ever had, people always seemed to want to think
small,"**(70 charachter limits)
says Geoffrey Ballard by way of explaining why he went into
-BYLN- fgdfhggdfjg
-TYPE- ***
-SUBJ- efforts to promote vehicles powered by zero-emission hydrogen-***
based fuel cells have earned him such accolades
-NAME- ***


-BODY-

I said this years ago and I see no reason to change my mind: The
family-owned, garaged vehicle is the last vehicle that's going to
get a fuel cell. Fuel cells are still 30 times the cost of what
they need to be for the automotive market. We will need to have
huge experimental fleets, where we will put hundreds of people in
controlled environments and see what they do with these vehicles.
Are people going to be buying them and taking them apart to see ho
they work? What sort of problems are we going to create? I doubt
that I will ever see a hydrogen car for personal consumption in a
showroom. But I am certainly going to struggle to stay alive long
enough to see the fleets change--army vehicles, taxis, trucks and

----------------------SAMPLE END-----------

* in the head part there will text and it should not exceed 70 characters
per line. if its gos to more than 70 characters, macro has to put enter or
para break. but it should not break from the middle of a word.

* in the body part, also same rule but charachter limits is 73.



Please help me some


Thejan
 
D

Doug Robbins - Word MVP

Answered in microsoft.public.vba.general.

Please do not spam the newsgroups by posting the same question separately to
multiple newsgroups. Rather, if you are not sure which is the most
appropriate newsgroup, insert the names of those which you think might be
appropriate into the header of a single message. When you do that, an
answer in one newsgroup will automatically appear in all of the newsgroups
to which you posted. That will make it easier for you to find responses and
can also reduce the possibility of someone developing an answer to a
question that has already been answered.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top