AcousticalConsultant
Technical User
Hi!
I have a bunch of bits of text stored as Autotexts in Word, and when I come to insert them into my document using VBA, a maximum of 255 characters are returned (it's not really a bug, I saw it documented in the on-line help). Does anyone know how this limitation can be overcome (other than creating two autotext entries and inserting them one after the other !!)
My second question relating to the same topic, is that when I insert the autotext into the document (again, using VBA) the text formatting (superscripts, bold, etc.) is gone!!
What bugs me is that when I insert them manually, everything works! (formatting is there, and the string can exceed 255 chars) But as soon as I use a macro to insert them, it's all screwy!
The command line I'm using is the following:
ActiveDocument.AttachedTemplate.AutoTextEntries("MyEntry" _
Where:=Selection.Range
One last thing... when the Autotext contains apostrophes, when I insert them (only when using VBA of course), the apostrophes become equal signs. However, this could be due to the keyboard configuration (I have french and english keyboards installed) so don't spend too much time trying to figure that one out. I created a function which replaces the equal signs back to apostrophes anyway!
Thanks for all the help!
Pascal
I have a bunch of bits of text stored as Autotexts in Word, and when I come to insert them into my document using VBA, a maximum of 255 characters are returned (it's not really a bug, I saw it documented in the on-line help). Does anyone know how this limitation can be overcome (other than creating two autotext entries and inserting them one after the other !!)
My second question relating to the same topic, is that when I insert the autotext into the document (again, using VBA) the text formatting (superscripts, bold, etc.) is gone!!
What bugs me is that when I insert them manually, everything works! (formatting is there, and the string can exceed 255 chars) But as soon as I use a macro to insert them, it's all screwy!
The command line I'm using is the following:
ActiveDocument.AttachedTemplate.AutoTextEntries("MyEntry" _
Where:=Selection.Range
One last thing... when the Autotext contains apostrophes, when I insert them (only when using VBA of course), the apostrophes become equal signs. However, this could be due to the keyboard configuration (I have french and english keyboards installed) so don't spend too much time trying to figure that one out. I created a function which replaces the equal signs back to apostrophes anyway!
Thanks for all the help!
Pascal