Forum Discussion

RmcDisney's avatar
RmcDisney
Copper Contributor
Nov 29, 2018

PDF File results that I don't want when saved

When I save my selected cells to a .pdf using the code below, Excel always inserts "Sample Excel File" at the top. How do I prevent this? I have also attached a partial screen capture. Any help would be appreciated as I have searched the net with no positive results. Thank you.

 

Sub Save_History()
'
' Save_History Macro
' Macro recorded 11/27/2018 by *******
   
ChDir "C:\Users\Cleopatra\Desktop"
Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\Cleopatra\Desktop\Test-Save.pdf", OpenAfterPublish:=True
End Sub
No RepliesBe the first to reply

Resources