View Single Post
 
Old 05-31-2019, 02:37 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

See http://www.gmayor.com/Userform.htm and in particular the FillBM function then you need something like.

Code:
Private Sub CommandButton1_Click()
    With ActiveDocument
        If UCase(TextBox1.Text) = "YES" Then
            FillBM "Text1", "The cow is green"
        Else
            FillBM "Text1", "The cow is not green"
        End If
    End With
    Unload Me
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote