S
Susan B. Quinn
I am obviously missing something in this whole coding game. I have done case
statements for drop down menus. I have set up option boxes that insert auto
texts.
I now want to insert an auto text based on the choice made from a drop down
menu. But the code while appearing to make sense doesn't work. What am I
missing???
Select case
Sub OnExitrecognise_DD()
Dim recogniseBks As Bookmarks
Dim recognise_Rng1 As Word.Range
Set recognise_Bks = ActiveDocument.Bookmarks
Set recognise_Rng1 = recognise_Bks("recognise_range").Range
ActiveDocument.Unprotect
Select Case ActiveDocument.FormFields("recognise_bm").Result
Case Is = "develop"
Set recongise_Rng1 =
..AttachedTemplate.AutoTextEntries("insert_text").Insert _
(Where:=recognise_Rng1, RichText:=True)
End Select
ActiveDocument.Protect wdAllowOnlyFormFields, NoReset:=True
End Sub
Nothing happens. It just skips over the bookmark without inserting anything.
Yours in code frustration.
statements for drop down menus. I have set up option boxes that insert auto
texts.
I now want to insert an auto text based on the choice made from a drop down
menu. But the code while appearing to make sense doesn't work. What am I
missing???
Select case
Sub OnExitrecognise_DD()
Dim recogniseBks As Bookmarks
Dim recognise_Rng1 As Word.Range
Set recognise_Bks = ActiveDocument.Bookmarks
Set recognise_Rng1 = recognise_Bks("recognise_range").Range
ActiveDocument.Unprotect
Select Case ActiveDocument.FormFields("recognise_bm").Result
Case Is = "develop"
Set recongise_Rng1 =
..AttachedTemplate.AutoTextEntries("insert_text").Insert _
(Where:=recognise_Rng1, RichText:=True)
End Select
ActiveDocument.Protect wdAllowOnlyFormFields, NoReset:=True
End Sub
Nothing happens. It just skips over the bookmark without inserting anything.
Yours in code frustration.