View Single Post
  #3   Report Post  
Dennis
 
Posts: n/a
Default

Thanks Klaus,

I will try it very soon.

Please check back if there any questions?

Dennis


Klaus Linke wrote:
Hi Dennis,

You can try the code below. Not very sophisticated, but it should

hopefully insert manual line breaks at the end of all wrapped lines in
the selected text.

If it turns out that Visio can't deal with the manual line breaks,

try Chr(10) or Chr(13) instead of Chr(11).

Dim myRange As Range
Set myRange = Selection.Range.Duplicate
Selection.Collapse (wdCollapseStart)
While Selection.End myRange.End
Selection.EndKey Unit:=wdLine
If Selection.Text vbCr Then
Selection.InsertAfter Chr(11)
End If
Selection.Collapse (wdCollapseEnd)
Selection.Move Unit:=wdCharacter, Count:=1
Wend

Abother option would be to save as "Text with layout", and re-open

that text file. But that export filter has been removed in Word2003...
you'll only have it if you have upgraded from an older version.

Regards,
Klaus


"Dennis" schrieb:
Office 2003
Word is a wonderful word processer. Visio, expecially,
text-box editing is cryptic at best.

Goal - 1) Type information (For the Visio text Box) in Word
2) Manually ascertain the approx line length that Visio
will handle in that particular text box.
3) Set margins manually in Word to wrap at #2's width
4) VBA-process the word document to place a soft return at
end of the wrapped line (should this be a hard return?)
Visio seems to handle a soft Return while text editing.
(Should I process to file as a word or as a text file?
5) Copy/Paste the processed file into Visio.

Would someone please supply the VBA code for #4 or other advice
to help solve my challenge?

Dennis