'Using an input box in MS Word to insert values into a word document

I am trying to put together what I had hoped would be a simple macro that would take a string of text with 4 different values that need to change between lines, but I am having a hard time getting the values to be added after the other text I have.

The basic goal of what I want to have spit out would be something like this,

  1. Thence N88°08’26”E along the existing southerly property line of said grantor’s tract, a distance of 6.00 feet to a point, said point being 36.00 feet left of station 1002+30.19;

The Code I have currently is here,

Dim sSTA As Variant
sSTA = InputBox("STA")
Dim sOFF As Variant
sOFF = InputBox("OFF")
Dim sDist As Variant
sDist = InputBox("Dist")
Dim sBear As Variant
sBear = InputBox("Bear")



Selection.TypeText Text:= _
    "Thence "
Selection.Fields.Add Range:=Selection.Range, Text:="sBear"
Selection.TypeText Text:= _
    "continuing along the proposed temporary easement line, a distance of "
Selection.Fields.Add Range:=Selection.Range, Text:=sDist
Selection.TypeText Text:= _
    " feet to a point, said point being "
Selection.Fields.Add Range:=Selection.Range, Text:=sOFF
Selection.TypeText Text:= _
    " feet left of station "
Selection.Fields.Add Range:=Selection.Range, Text:=sSTA
Selection.TypeText Text:= _
    ";"

The output I keep getting ignores the user input from the input box.

Any tips on how to actually fix this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source