|
|
|
date: Wed, 07 Dec 2005 09:08:43 +1000,
group: microsoft.public.word.vba.addins
back
Re: Export Autotext Enties to a word table
Absolutely wonderful.
If anyone else ever needs to do this, take a look at
Sub ExportAutotextEntries()
Documents.Add
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=(2),
NumColumns:=2, DefaultTableBehavior:=wdWord9TableBehavior,
AutoFitBehavior:= _
wdAutoFitFixed
For Each I In ActiveDocument.AttachedTemplate.AutoTextEntries
Selection.TypeText I.Name
Selection.MoveRight Unit:=wdCell
I.Insert Where:=Selection.Range, RichText:=True
Selection.MoveRight Unit:=wdCell
Next I
MsgBox "Done"
End Sub
works a treat !
Tony Strazzeri wrote:
> Hi Michael,
>
> Instead of using I.value define I as AutotextEntry (not essential) and
> replace the line with I.Insert Where:=Selection.Range,
> RichText:=True
>
>
> Cheers
> TonyS
>
--
Regards,
Michael Jenkin
MCP MVP SBS
Australia
www.mickyj.com
date: Wed, 07 Dec 2005 11:26:10 +1000
author: Michael Jenkin [SBS-MVP]
|
|