The short answer is no, however what you ask is possible if you change the concept a little.
Use the following macro to insert 11 bookmarks at the location where you want the selection of autotexts to be entered.
Sub InsertBMs()Dim oRng As Range
Dim i As Integer
Dim oBM As Bookmark
Set oRng = Selection.Range
oRng.Collapse 0
For i = 1 To 11
oRng.Text = "BM" & i
Set oBM = oRng.Bookmarks.Add("BM" & i)
Set oRng = oBM.Range
oRng.Collapse 0
oRng.Text = ChrW(8203)
oRng.Collapse 0
Next i
lbl_Exit:
Set oBM = Nothing
Set oRng = Nothing
Exit Sub
End Sub
Rename your AutoText entries BM1 to BM11 to reflect the bookmark names and the numbers of the checkboxes.
Use the following code in your useform. The code will fill the bookmarks with the appropriate autotext entry or a zero width space according to the check box selections. You can recall the userform and change the selections if you wish.
Option Explicit
Private Sub CommandButton1_Click()
Dim oCtrl As Control
Dim strName As String
Dim strText As String
Dim strNum As String
For Each oCtrl In Me.Controls
strName = oCtrl.Name
If strName Like "CheckBox*" Then
strNum = Replace(strName, "CheckBox", "")
strText = "BM" & strNum
If oCtrl.value = True Then
AutoTextToBM strText, ActiveDocument.AttachedTemplate, strText
Else
FillBM strText, ChrW(8203)
End If
End If
Next oCtrl
Unload Me
lbl_Exit:
Set oCtrl = Nothing
Exit Sub
End Sub
Private Sub AutoTextToBM(strbmName As String, oTemplate As Template, strAutotext As String)
'Graham Mayor - - Last updated - 17 Jul 2018
'strBMName is the name of the bookmark to fill
'oTemplate is the template with the autotext - probably ActiveDocument.AttachedTemplate
'strAutotext is the name of the autotext entry
Dim oRng As Range
On Error GoTo lbl_Exit
With ActiveDocument
Set oRng = .Bookmarks(strbmName).Range
Set oRng = oTemplate.AutoTextEntries(strAutotext).Insert _
(Where:=oRng, RichText:=True)
.Bookmarks.Add Name:=strbmName, Range:=oRng
End With
lbl_Exit:
Exit Sub
End Sub
Private Sub FillBM(strbmName As String, strValue As String)
'Graham Mayor - http://www.gmayor.com
Dim oRng As Range
With ActiveDocument
On Error GoTo lbl_Exit
Set oRng = .Bookmarks(strbmName).Range
oRng.Text = strValue
oRng.Bookmarks.Add strbmName
End With
lbl_Exit:
Set oRng = Nothing
Exit Sub
End Sub