This is what i want to do:
Table with two collumns. at the one side the short text and at the other collumn the Whole text that i want to import to the autotext gallery.
As in the attachment.
i have seen another code that have the same function, but this import the texts into the auto correct list.
Sub MultiAutoCorrectGenerator()
' Adapted by Greg Maxey from MultiFindAndReplace code provided by Doug Robbins
Dim oDoc As Document
Dim i As Integer
Dim Wrong As Range
Dim Right As Range
Set oDoc = ActiveDocument
For i = 2 To oDoc.Tables(1).Rows.Count
If oDoc.Tables(1).Rows(i).Cells(1).Range.Characters.C ount > 1 Then
Set Wrong = oDoc.Tables(1).Cell(i, 1).Range
Wrong.End = Wrong.End - 1
Set Right = oDoc.Tables(1).Cell(i, 2).Range
Right.End = Right.End - 1
AutoCorrect.Entries.Add Name:=Wrong, Value:=Right
End If
Next i
End Sub
Is it possible to make something like this to import the texts to autotext instead?
|