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 / October 2007

Tip: Looking for answers? Try searching our database.

Retain Format when calling Autotext

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mickey - 29 Oct 2007 21:45 GMT
Hi,
I have written a macro that calls an autotext. Works fine except I lose the
formatting, i.e, tabs, font size, bold, ect.  Is there a way around this.

Thanks,
Mickey
Word 2000
Jean-Guy Marcil - 29 Oct 2007 21:55 GMT
Mickey was telling us:
Mickey nous racontait que :

> Hi,
> I have written a macro that calls an autotext. Works fine except I
[quoted text clipped - 4 lines]
> Mickey
> Word 2000

What code are you using to insert the Autotext entries?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Mickey - 29 Oct 2007 22:07 GMT
I'm using the following code:

Selection.Paragraphs.TabStops.ClearAll
   Selection.ParagraphFormat.TabStops.ClearAll
   Selection.Paragraphs.TabStops(InchesToPoints(1.25)) _
   .Alignment = wdAlignTabLeft
   Selection.Paragraphs.TabStops(InchesToPoints(6.5)) _
   .Alignment = wdAlignTabRight
   
     
   Selection.Collapse Direction:=wdCollapseEnd
   NormalTemplate.AutoTextEntries("QPace").Insert _
   Where:=Selection.Range

> Mickey was telling us:
> Mickey nous racontait que :
[quoted text clipped - 9 lines]
>
> What code are you using to insert the Autotext entries?
Jay Freedman - 30 Oct 2007 01:27 GMT
NormalTemplate.AutoTextEntries("QPace").Insert _
   Where:=Selection.Range, RichText:=True

If you put the cursor on the method name (.Insert) and press F1, you
get the Help topic about that method, which explains the optional
RichText argument.

>I'm using the following code:
>
[quoted text clipped - 23 lines]
>>
>> What code are you using to insert the Autotext entries?

--
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.
 
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.