Thanks to all of you. Now I am getting 'Run-time error '91': Object variable or With block variable not set'.
Code:
Private Sub CommandButton1_Click()
Dim StrPth As String
StrPth = GetFolder & "\"
If StrPth = "\" Then Exit Sub
With ActiveDocument
.SaveAs2 FileName:=StrPth & "\Documents\NURS_353_Clinical_Evaluation_" & _
Replace(.FormFields("Client").Result, " ", "_") & "_" & _
Format(Date, "MM.DD.YYYY") & ".PDF", _
FileFormat:=wdFormatPDF, AddToRecentFiles:=False
End With
End Sub
Function GetFolder() As String
Dim oFolder As Object
GetFolder = ""
Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0)
If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path
Set oFolder = Nothing
End Function