Hello,
I’m trying to send a sheet in excel as pdf in outlook. I would love to know how i can change the pdf attached name that gets sent in outlook from excel using vba.
This is part of the code:
strPath = Environ$(“temp”) & “” strFName = Replace(ActiveWorkbook.Name, “.pdf”, “”) strFName = Left(strFName, InStrRev(strFName, “.”) – 1) & ” _ ” & ws3.Range(“E10″).Value _ & ” _ ” & Format(Now, “dd-mmm-yy”) & “.pdf” ws3.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _ strPath & strFName, Quality:=xlQualityStandard, _ IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
i tried to change ActiveWorkbook.Name but it gives me an error. Can someone please help?
Thank you.