+ Reply to Thread
Results 1 to 6 of 6

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

  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"


    Please Login or Register  to view this content.
    Last edited by jonvanwyk; 07-20-2011 at 12:41 PM. Reason: clarity

  2. #2
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Re: Convert worksheet to PDF and attach the PDF to a new Outlook email using VBA

    Maybe this will help you Out?

    http://www.rondebruin.nl/pdf.htm

    ...
    Thank You, Mike

    Some Helpful Hints:

    1. New members please read & follow the Forum Rules
    2. Use Code Tags...Place[code]Before the first line and[/code] After the last line.
    3. If you are pleased with a solution mark your post SOLVED.
    4. Thank those who have help you by clicking the scales at the top right of the post.

    Here...

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

    Re: Convert worksheet to PDF and attach the PDF to a new Outlook email using VBA

    @niceguy: Yea I found Ron's code through a Google search and have been trying to get it to work while waiting for help in this forum, but I have not been able to get it to work yet. Perhaps I should just post what I have come up with so far and get Ron's modified code critiqued here?

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

    Re: Convert worksheet to PDF and attach the PDF to a new Outlook email using VBA

    Based on the tutorials above, here is what I have put together so far. The code does not work and I get a "Compile error: Sub or Function not defined". Can anyone help?


    Please Login or Register  to view this content.

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

    Re: Convert worksheet to PDF and attach the PDF to a new Outlook email using VBA

    The code below reflects what I am using to automatically create and save a pdf with conditional naming of the file on a network drive depending on which boxes are checked in a list. However, some individuals who may be checked are not able to access the network. In this instance, I need for the created PDF to be attached to an email with a predetermined email address using the same macro button.

    I have been referred to http://www.rondebruin.nl/pdf.htm but have been unable to come up with something that works. Any help in modifying the code below is greatly appreciated!

    For instance, if A52 = TRUE and A60 = TRUE, then create PDF based on the same naming scheme [Cells(2, 2).Value & " - " & Cells(6, 2).Value & ".pdf"] and attach the PDF to an email, and automatically email it to johndoe@email.com.


    Please Login or Register  to view this content.
    Last edited by jonvanwyk; 07-19-2011 at 01:00 PM.

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

    Re: Convert to PDF, Save to Network Drive, AND/OR attach PDF to an email (Automatical

    I got the basic code to work, now just need to adapt it to my specific situation.

+ Reply to Thread

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