Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Copying an AutoText entry

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Larry - 26 Jan 2007 03:45 GMT
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.
Jay Freedman - 26 Jan 2007 15:26 GMT
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.

Signature

Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> 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
[quoted text clipped - 5 lines]
>
> Thanks.
Larry - 27 Jan 2007 03:20 GMT
Jay,

Thanks.

Larry

> 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
[quoted text clipped - 18 lines]
> >
> > Thanks.
Jay Freedman - 27 Jan 2007 04:42 GMT
Just for completeness, I confirmed that the situation is still the
same in Word 2007.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

>Jay,
>
[quoted text clipped - 29 lines]
>> >
>> > Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.