I have a userform which contains some textboxes and a button.
when button is pressed it insert text at the end of the document. however I need to insert the text as following format:
- First line bold - textbox1
- Second line is a web link so it should be converted into hyperlink i.e blue, underline - textbox2
- Thrid line is simple text not bold. - textbox3 & 4
the following code does insert the text but not formatted as required. how do I insert the text with least code possible?
Private Sub CommandButton2_Click()
Dim CR As Range
Selection.EndKey wdStory
Set CR = Selection.Range
CR.Text = vbCr & TextBox1.Text _
& vbCr & TextBox2.Text _
& vbCr & TextBox3.Text & " at " & TextBox4.Text
End Sub
Possible formatting:
