Ok, so basically we have a couple of unique sections in a macro-enabled template for Word 2007 and for each section, we have 2 entries that are standard for the form, and then there are about 20 optional entries that are all handled by AutoText. The formatting is identical between the template and the AutoText entries and I'm wanting to auto-number the entries as they are added (either by the user typing the AutoText keyphrase or hitting a button on the ribbon to insert it). Is there an easy way to do this? Here is the block of code where one of these (numbered) entries is handled and what I've tried to implement as a numbering scheme from other suggestions on other forums (couldn't find anything useful here):
Case "cboFF"
SetMargins 0, 1, 1
Selection.ParagraphFormat.Space1
Selection.Text = "FINDINGS OF FACT" & vbLf
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Bold = True
Selection.Font.Underline = wdUnderlineSingle
Selection.Collapse (wdCollapseEnd)
Selection.Text = vbLf
Selection.ParagraphFormat.SpaceAfter = 6
Selection.Collapse (wdCollapseEnd)
Selection.ParagraphFormat.Alignment = wdAlignParagraphJustify
Selection.Font.Underline = wdUnderlineNone
Selection.Font.Bold = False
SetMargins 0, 1, 1
'With ListGalleries(wdNumberGallery).ListTemplates(1).ListLevels(1)
'.NumberFormat = "%1."
'.TrailingCharacter = wdTrailingTab
'.NumberStyle = wdListNumberStyleNone
'.NumberPosition = InchesToPoints(0.5)
'.Alignment = wdListLevelAlignLeft
'.TextPosition = InchesToPoints(0.5)
'.ResetOnHigher = 0
'.StartAt = 1
'AutoNumberOnFOF
Selection.Text = "On " & strDateFOF & ", an industrial appeals judge certified that the parties agreed to include the Jurisdictional History in the Board record solely for jurisdictional purposes." & vbLf
Selection.ParagraphFormat.SpaceAfter = 6
Selection.Collapse (wdCollapseEnd)
Select Case strCaseCategory
Case "IND", "IND SELF-I"
If frmIIOD.optII.Value = True Then
Selection.Text = "II-FF"
Selection.Range.InsertAutoText
Selection.Collapse (wdCollapseEnd)
Selection.Text = vbLf
Selection.ParagraphFormat.SpaceAfter = 6
Selection.Collapse (wdCollapseEnd)
GoToEnd
End If
If frmIIOD.optOD.Value = True Then
Selection.Text = "OD-FF"
Selection.Range.InsertAutoText
Selection.Collapse (wdCollapseEnd)
Selection.Text = vbLf
Selection.ParagraphFormat.SpaceAfter = 6
Selection.Collapse (wdCollapseEnd)
GoToEnd
End If
If frmIIOD.optNotNeeded.Value = True Then
Selection.Text = vbLf
Selection.ParagraphFormat.SpaceAfter = 6
Selection.Collapse (wdCollapseEnd)
End If
Case Else
'Do Nothing
End Select
Any constructive comments will be much appreciated to help solve this issue. I'm still very new to programming as a whole and most of my experience lies in C# and Java.
Edit: The structure of the document is essentially a set of itemized lists containing legal text that is updated by a user as the appeal process goes through various stages. In each of the last 2 sections the itemized lists need to follow a specific numbering scheme (num at .5", text at 1", right tab at 1") which is not native to Word 2007. There is a bolded heading for each of the sections that is the starting point of the numbering. The AutoText entries will be added as needed by the user. The rest of the document pulls information from our database and contains the legal wording necessary for the document. If I could just figure out how to initiate the numbering for each section individually, then I could finish this up.