Copying an AutoText entry

L

Larry

In Word 97, is it possible to copy an AutoText entry directly into the
Clipboard, that is, without inserting the entry into a document and then
copying it?

I tried something like this, but it's only limited to 255 character:

MsgBox NormalTemplate.AutoTextEntries("sString").Value

Thanks.
 
J

Jay Freedman

No, you must insert and copy to get more than 255 characters. The limitation
isn't in the transfer mechanism, but in the Value property of the
AutoTextEntry object. That's documented in the VBA Help topic about the
Value property.

Since there's no way to ask Word how many characters are "really" in the
entry, you can't use the Value property for this purpose at all unless you
(or your macro) were the creator of the entry and have independent knowledge
of its length.

BTW, this is still true in Word 2003. I haven't checked 2007 yet, but I
expect it's the same.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
L

Larry

Jay,

Thanks.

Larry


Jay Freedman said:
No, you must insert and copy to get more than 255 characters. The limitation
isn't in the transfer mechanism, but in the Value property of the
AutoTextEntry object. That's documented in the VBA Help topic about the
Value property.

Since there's no way to ask Word how many characters are "really" in the
entry, you can't use the Value property for this purpose at all unless you
(or your macro) were the creator of the entry and have independent knowledge
of its length.

BTW, this is still true in Word 2003. I haven't checked 2007 yet, but I
expect it's the same.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
J

Jay Freedman

Just for completeness, I confirmed that the situation is still the
same in Word 2007.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

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