Quote Originally Posted by gmayor View Post
It depends on what you want to achieve. If you are talking about the last example you can code it like
Case Is = 0    'First item in list
            If ListBoxCoC.Text = "General Comments" Then
                AutoTextToBM "EVTBookMark01", ActiveDocument.AttachedTemplate, "GeneralComments"
                AutoTextToBM "EVTBookMark02", ActiveDocument.AttachedTemplate, "SpecificComments"
            ElseIf ListBoxCoC.Text = "Specific Comments" Then
                'Do something associated with the Specific Comments option
            Else
                'Neither option selected so do something else
            End If
or you can use a second set of case statements e.g

Sub InsertExistingBuildingBlock()
    FillBM "EVTBookMark01", ""
    FillBM "EVTBookMark02", ""
    Select Case ComboBoxDocType.ListIndex
        Case Is = 0    'First item in ComboBoxDocType list
            Select Case ListBoxCoC.Text
                Case Is = "General Comments"
                    'do stuff associated with General Comments
                Case Is = "Specific Comments"
                    'do stuff associated with Specific Comemnts
                Case Else
                    'neither selected so do something else or leave this empty and do nothing at all
            End Select
        Case Is = 1    'Second item in ComboBoxDocType list
            Select Case ListBoxCoC.Text
                Case Is = "General Comments"
                    'do stuff associated with General Comments
                Case Is = "Specific Comments"
                    'do stuff associated with Specific Comemnts
                Case Else
                    'neither selected so do something else or leave this empty and do nothing at all
            End Select
        Case Else    'Nothing selected
    End Select
End Sub
Unless you tell us what you expect to happen, I can't tell you how to program it, but the above should point the way.
Just imagine you have to create a new document from a template. You double-click on the EVT.dotm document and a new document opens, covered by this interface. It first gives you the choice (ComboBoxDocType) between creating a Compilation of Comments, a Lessons Obervation, a Military Advice or a Initiating Military Directive. After having xhosen your document type, a further choice appears in that interface where you need to choose the chapters that will appear in your document.
Case 1: Imagine you want to create aCompilation of Comments and you click on it in the initial scroll-down menu (ComboBoxDocType) Then comes up a further field with choices (ListBoxCoC). For the Compilation of Comments, you have the choice between General Comments and Specific Comments. You can potentially choose either the General Comment (in which case only the GeneralComments building block ought to be inserted in EVTBookMark01), or the Specific Comments (in which case only the SpecificComments building block is inserted), or both GeneraComments and SpecificComments building blocks are to come in the document to be creates at bookmarks EVTBookMark01 and EVTBookMark02.
Case 2: I want to create a Military Advice. I click on it in the ComboBoxDocType and a further fiels poops up (ListBoxMA). This listbox offers me 4 options: References, SITUATION AND AIM, CONSIDERATIONS, RECOMMENDATION(S). Here again, the author can pick and choose any one, two, three or all four of the choices. The chosen headings, corresponding to building blocks References, SITUATION, CONSIDERATIONS and RECOMMENDATION, respectively, will have to be inserted in the document at the relevant bookmarks, i.e. EVTBookMark01, EVTBookMark02, EVTBookMark03 and EVTBookLMark04 (they all exist in the template EVT.dotm already).
Does this make things any clearer. I'm afraid I cannot attach the template here so that you can have a better idea.