VBA Code to read doc and apply/unapply hard CR at 4 inches

D

Dennis

Using Word 2000

What VBA code will accomplish the challenge below:

Wish to use Word as my text editor for a Visio 2000
Text Box insertion.

In Word, I wish to format the "page width" to 4 inches
which is exactly the width I wish in the Vision Text Box.

Of course as I enter text into Word, wrapping occurs
(without a CR, of course) at about 4 inches (the page
width) which is just fine.

When I copy/paste the text (in Word) to Visio, only hard
Word CR's are recognized in Visio.

Is there VBA Code that will read a .doc file
and wrap with a hard CR at exactly 4 inches. Also code
that will (in reverse) remove existing hard CR's at
exactly four inches - leaving all other CR's alove?

[NOTE: When I add a hard CR to each line manually, the
copy/paste to Visio works fine.]

TIA Dennis
 
W

Word Heretic

G'day "Dennis" <[email protected]>,

There is no existing code but it is possible using
Selection.Information to tell you how far into the text you are as you
move through the chars in the range.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Dennis reckoned:
 

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