Hi Jay,
hi Alok,
Dim i As Long
For i = 1 To 100000
On Error GoTo errortrap
ActiveDocument.Variables.Add Name:="v" & CStr(i)
Next
errortrap:
MsgBox i ' 32768
>If there is a specific maximum number, it's probably either 32768 or
>65536 (the largest 15-bit or 16-bit integer, depending on whether the
>MS programmers used a signed or unsigned integer for the index into
>the Variables collection).
Sufficient, anyway, I'd say.
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
Jay Freedman - 05 Dec 2004 02:46 GMT
Thanks, Helmut. I suspect that's the limit for all Word collections
that have numeric indexes.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
>Hi Jay,
>hi Alok,
[quoted text clipped - 19 lines]
>Word XP, Win 98
>http://word.mvps.org/