Results 1 to 6 of 6

Convert to PDF, Save to Network Drive, AND/OR attach PDF to an email (Automatically)

Threaded View

  1. #1
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Convert to PDF, Save to Network Drive, AND/OR attach PDF to an email (Automatically)

    I am using the code below attached to a "Submit Request" button that converts the file into a PDF and then automtically saves it to a folder on the network drive. Depending on if other cells are "true", I need the converted PDF to be emailed instead of saved when other cells are "true" such as:

    E7 = TRUE AND E17 OR E18 OR E19 OR E20 = TRUE, then email .pdf to "person1@email.com"


    Sub clicksubmit01()
    
        Dim FileName As String
        
        FileName = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 5)
        ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
                "S:\Folder\" & Cells(2, 2).Value & " - " & Cells(6, 2).Value & ".pdf", _
                Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
                :=False, OpenAfterPublish:=False
        Range("A1:D27").Select
        
    End Sub
    Last edited by jonvanwyk; 07-20-2011 at 12:41 PM. Reason: clarity

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1