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 / September 2006

Tip: Looking for answers? Try searching our database.

Formatting Autotext

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark - 06 Sep 2006 12:44 GMT
I am using Officed 97.

I have created an autotext entry from a document by highlighting and adding
an autotext entry in a template, the formatting of the document is fine when
it is put into the autotext.  

If I call the autotext  in the normal manner it returns in the correct
format, but when I call this autotext from the following code, it loses a lot
of its formatting.  Is there a way with code to prevent this please?

ActiveDocument.AttachedTemplate.AutoTextEntries("192general").Insert
Where:=Selection.Range

If so, would someone be kind enough to supply me with the code.

Signature

Mark

Stefan Blom - 06 Sep 2006 12:52 GMT
Try setting the RichText argument to True when inserting:

  ActiveDocument.AttachedTemplate.AutoTextEntries("test") _
  .Insert Where:=Selection.Range, RichText:=True

Signature

Stefan Blom
Microsoft Word MVP

> I am using Officed 97.
>
[quoted text clipped - 5 lines]
> format, but when I call this autotext from the following code, it loses a lot
> of its formatting.  Is there a way with code to prevent this please?

ActiveDocument.AttachedTemplate.AutoTextEntries("192general").Insert
> Where:=Selection.Range
>
> If so, would someone be kind enough to supply me with the code.
 
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.