-
The comprehensive coding is:
Sub InsertExistingBuildingBlock()
Select Case ComboBoxDocType.ListIndex
Case Is = 0 'First item in list
If ListBoxCoC.Text = "General Comments" Then
AutoTextToBM "EVTBookMark01", ActiveDocument.AttachedTemplate, "GeneralComments"
End If
If ListBoxCoC.Text = "Specific Comments" Then
AutoTextToBM "EVTBookMark02", ActiveDocument.AttachedTemplate, "SpecificComments"
End If
Case Is = 1 'Second item in list
AutoTextToBM "EVTBookMark01", ActiveDocument.AttachedTemplate, "Table"
Case Is = 2
If ListBoxMA.Text = "References" Then
AutoTextToBM "EVTBookMark01", ActiveDocument.AttachedTemplate, "References"
End If
If ListBoxMA.Text = "INTRODUCTION AND AIM" Then
AutoTextToBM "EVTBookMark02", ActiveDocument.AttachedTemplate, "INTRODUCTION"
End If
If ListBoxMA.Text = "CONSIDERATIONS" Then
AutoTextToBM "EVTBookMark03", ActiveDocument.AttachedTemplate, "CONSIDERATIONS"
End If
If ListBoxMA.Text = "RECOMMENDATION(S)" Then
AutoTextToBM "EVTBookMark04", ActiveDocument.AttachedTemplate, "RECOMMENDATIONS"
End If
Case Is = 3
If ListBoxIMD.Text = "References" Then
AutoTextToBM "EVTBookMark01", ActiveDocument.AttachedTemplate, "References"
End If
If ListBoxIMD.Text = "SITUATION" Then
AutoTextToBM "EVTBookMark02", ActiveDocument.AttachedTemplate, "SITUATION"
End If
If ListBoxIMD.Text = "MISSION" Then
AutoTextToBM "EVTBookMark03", ActiveDocument.AttachedTemplate, "MISSION"
End If
If ListBoxIMD.Text = "DIRECTION" Then
AutoTextToBM "EVTBookMark04", ActiveDocument.AttachedTemplate, "DIRECTION"
End If
If ListBoxIMD.Text = "ANNEXES" Then
AutoTextToBM "EVTBookMark05", ActiveDocument.AttachedTemplate, "Annexes"
End If
Case Else 'Nothing selected
End Select
End Sub
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules