Hi Rick,
>I notice that when I record a new macro from Word (Tools | Macro |
>Record New Macro) and the macro includes a lot of straight text typing,
>the resultant code consists of many separate TypeText() statements, each
>with its (Text) argument consisting of 60 or so characters. Why does
>Word do it like that? That [Text] arg can be longer than 60 chars, yes?
>What is the limit? Thanks much.
>Why does Word do it like that?
who knows,
maybe 60 characters was a nice value to split lines.
>That [Text] arg can be longer than 60 chars, yes?
indeed. Try:
Selection.TypeText Text:= ActiveDocument.Range.Text
until system crashes.

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Rick Charnes - 26 Feb 2007 17:00 GMT
Does anyone know what the limit is? I guess I could just try it myself,
increasing it until my system crashes!
> Hi Rick,
>
[quoted text clipped - 17 lines]
>
> until system crashes.
Klaus Linke - 27 Feb 2007 02:05 GMT
About 64kB characters (65536), I think. If you need to insert longer text,
.InsertAfter is better.
Regards,
Klaus
> Does anyone know what the limit is? I guess I could just try it myself,
> increasing it until my system crashes!
[quoted text clipped - 20 lines]
>>
>> until system crashes.
Jezebel - 27 Feb 2007 05:15 GMT
65534 is the max.
Try --
selection.TypeText string(65535, "X")
> About 64kB characters (65536), I think. If you need to insert longer text,
> .InsertAfter is better.
[quoted text clipped - 28 lines]
>>>
>>> until system crashes.