Selection.TypeText Bug for String Len >= 33683

S

Sonny Maou

Can somebody confirm/deny this issue?

I've got a variable of length 33683 which

Selection.TypeText myVar

does not successfully print... it only prints 100 or so characters
(haven't counted exactly, and don't know which part of the string it is...).

However, if I do this:

halfway = int(len(myVar)/2)
Selection.TypeText left(myVar, halfway)
Selection.TypeText mid(myVar, halfway+1)

it prints everything fine.

Thank you!
 
S

Sonny Maou

Sonny said:
Can somebody confirm/deny this issue?

Oops! Forgot to mention, this is for a Windows XP + Word 2003
environment only (apparently). It seems to work properly on my other PCs
running Win2K with Word 2002, etc...
 
D

Doug Robbins - Word MVP

Try

Selection.InsertBefore myVar

--
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 paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
K

Klaus Linke

Hi Sonny,

Yep, ".TypeText" always was limited to 64 kB... with Unicode (2
bytes/character) that's 32767 characters, possibly minus a few.

Greetings,
Klaus
 
S

Sonny Maou

Klaus said:
Hi Sonny,

Yep, ".TypeText" always was limited to 64 kB... with Unicode (2
bytes/character) that's 32767 characters, possibly minus a few.

Greetings,
Klaus

Thanks for the heads-up, Klaus! :)
 

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