If this is Word 2007 or above, then put the button in design mode from the Developer tab. Right click your button and select View Code.
Note the number of the ComandButton. It will probably be 1
Replace all the code with the following, changing the button number, if necessary, to what it was originally.
Save the document as macro enabled.
Before Word 2007 there was no Word function to create PDF, which requires a third party application to achieve.
Option Explicit
Private Sub CommandButton1_Click()
Dim strDocName As String
Dim strPath As String
Dim intPos As Integer
Start:
'Find position of extension in filename
strDocName = ActiveDocument.Name
strPath = ActiveDocument.Path & "\"
intPos = InStrRev(strDocName, ".")
If intPos = 0 Then
ActiveDocument.Save
GoTo Start
End If
strDocName = Left(strDocName, intPos - 1)
strDocName = strPath & strDocName & ".pdf"
ActiveDocument.ExportAsFixedFormat OutputFilename:=strDocName, _
ExportFormat:=wdExportFormatPDF, _
OpenAfterExport:=False, _
OptimizeFor:=wdExportOptimizeForPrint, _
Range:=wdExportAllDocument, From:=1, to:=1, _
Item:=wdExportDocumentContent, _
IncludeDocProps:=True, _
KeepIRM:=True, _
CreateBookmarks:=wdExportCreateHeadingBookmarks, _
DocStructureTags:=True, _
BitmapMissingFonts:=True, _
UseISO19005_1:=False
lbl_Exit:
Exit Sub
End Sub