View Single Post
 
Old 08-18-2020, 11:11 AM
Kindyr Kindyr is offline Windows 10 Office 2019
Novice
 
Join Date: Aug 2020
Posts: 12
Kindyr is on a distinguished road
Default

I figured it out!! S

Private Sub PrintBlurb2_Click()
' Declare everything strings.
Dim EVParty, EVNum, arr() As String
' Pull the values from the Userform text boxes of PartyTypeList and EvidenceID.
EVParty = PartyTypeList.Value
EVNum = EvidenceID.Value

'Create a simple array of one item that pushed the two items together into one item.

arr = Split("EVParty&EVNum| EVPartyEVNum", "|")

'Use the array zero point to create a variable with an out put that is the same as the name of the variable, but with a space in it.
ActiveDocument.Variables(arr(0)) = EVParty & " " & EVNum

' Make a message box that does the check.
MsgBox ActiveDocument.Variables(arr(0))

Unload Me

End Sub
Reply With Quote