Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    May 2012
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Email PDF - PLEASE HELP

    Hi,

    I am creating a workbook that saves an excel copy and a pdf copy. I would like to email the PDF using outlook. It saves as a pdf but I am having difficulty attaching the PDF. This is my code below.... PLEASE HELP

    Sub MailPDF

    strLoc = "C:\Users\Mizpah\Documents\Shekira\Reports\"

    strDir = strLoc & "Deal\P_Reports\PDF\" & ActiveSheet.Range("V3").Value & "\"

    wbReport.ExportAsFixedFormat _
    Type:=xlTypePDF, _
    FileName:=strDir & "Q1_2012_" & ActiveSheet.Range("V3").Value & "_" & "Service Manager_Report" & ".pdf"


    '************Start of emailing code*********
    Set Mail_Object = CreateObject("Outlook.Application")
    With Mail_Object.CreateItem(o)
    .Subject = "Report File"
    .To = "shekira.mounsey@hotmail.com"
    .Body = "EMAIL TEXT GOES HERE" & Chr(13) & Chr(13) & "Regards," & Chr(13) & "Fred Hamin" & Chr(13) & "YOUR ADDRESS"
    .Attachments.Add FileName
    .Display
    .Send
    End With
    Application.DisplayAlerts = False
    Set Mail_Object = Nothing
    End Sub

  2. #2
    Lounger
    Join Date
    May 2012
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am getting a Run-time error`-2147024894 (800700002):

    Cannot find this file. Verify the path and file name are correct.

    I workbook is created and saved as a excel file and also as a pdf file however it is not finding the file path of the file

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •