Your syntax is incorrect. You need something like the following. The folder C:\mydocuments must exist!
Code:
Dim strName As String
Dim strNum As String
Dim oCC As ContentControl
Const strPath As String = "C:\mydocuments\" 'Which must exist!
With ActiveDocument
For Each oCC In .ContentControls
If LCase(oCC.Title) = "tbpanelnumber" Then
If Trim(oCC.Range.Text) = oCC.PlaceholderText Then
oCC.Range.Select
MsgBox "Enter TB Panel Number"
Exit Sub
Else
strNum = Trim(oCC.Range.Text)
End If
End If
If LCase(oCC.Title) = "tbpanelname" Then
If Trim(oCC.Range.Text) = oCC.PlaceholderText Then
oCC.Range.Select
MsgBox "Enter TB Panel Name"
Exit Sub
Else
strName = Trim(oCC.Range.Text)
End If
End If
Next oCC
.SaveAs2 Filename:=strPath & strNum & strName & ".docx"
End With