A family of Microsoft word processing software products for creating web, email, and print documents.
I would create a userform - seehttp://www.gmayor.com/Userform.htm
Using that as an example create a form with three fields, and a command button
Top field is for Travel To, middle field is for Working and bottom field is for Travel From
Add a Label across the top of the form to display messages (Label1) . Add more labels to describe the fields and then associate the following code with the form.
Option Explicit
Private Sub CommandButton1_Click()
Dim oRng As Range
Dim i As Long
If Not IsNumeric(Me.TextBox1.Value) Then
Me.Label1.Caption = "Enter a numeric value in Travel To days!"
Me.TextBox1.SetFocus
Exit Sub
End If
If Not IsNumeric(Me.TextBox2.Value) Then
Me.Label1.Caption = "Enter a numeric value in Working days!"
Me.TextBox2.SetFocus
Exit Sub
End If
If Not IsNumeric(Me.TextBox3.Value) Then
Me.Label1.Caption = "Enter a numeric value in Travel From days!"
Me.TextBox3.SetFocus
Exit Sub
End If
For i = 1 To Me.TextBox1.Value
Set oRng = ActiveDocument.Range
oRng.Collapse wdCollapseEnd
ActiveDocument.AttachedTemplate.BuildingBlockEntries("Travel To").Insert Where:=oRng, _
RichText:=True
Next i
For i = 1 To Me.TextBox2.Value
Set oRng = ActiveDocument.Range
oRng.Collapse wdCollapseEnd
ActiveDocument.AttachedTemplate.BuildingBlockEntries("Working").Insert Where:=oRng, _
RichText:=True
Next i
For i = 1 To Me.TextBox3.Value
Set oRng = ActiveDocument.Range
oRng.Collapse wdCollapseEnd
ActiveDocument.AttachedTemplate.BuildingBlockEntries("Travel From").Insert Where:=oRng, _
RichText:=True
Next i
Unload Me
End Sub
Basically it inserts your Travel To building block from the document template as many times as you request, then as many copies of your working building block and finally as many copies of yoir travel from building block as you request.
I have tried to keep it as simple as possible to get you started. You will have to supply the correct names and locations for the building blocks