If this is an ActiveX command button, you could pass the processing off to a second macro that handles the PDF creation & emailing. As part of that process, it could delete the command button, then restore it again (via Application.Undo) after the PDF has been created.
PS: When posting code, please use the code tags. They're on the 'Go Advanced'
tab at the bottom of this screen.
PPS: You could reduce:
Code:
ActiveDocument.ExportAsFixedFormat OutputFileName:=PDFname, _
ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, _
OptimizeFor:=wdExportOptimizeForPrint, Range:=wdExportAllDocument, _
Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False
to:
Code:
ActiveDocument.SaveAs2 FileName:=PDFname, FileFormat:=wdFormatPDF