Modify code to attach specific sheet as .xlsx

  • Hi,

    I am using this code to send and attachment through outlook as a PDF. Now I need to send that same attachment as a .xlsx. Also I would like it to be a specific sheet that is attached, not active sheet.

    How can this code be modified?

  • Re: Modify code to attach specific sheet as .xlsx

    you can add something like

    Dim wb As Workbook
        Set wb = ActiveWorkbook
        PdfFile = ThisWorkbook.Path & "\" & ActiveSheet.Name & " " & Range("I10").Value & " " & Range("I11").Value
        With wb
            .SaveAs PdfFile
            .Close False
        End With

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!