+ Reply to Thread
Results 1 to 11 of 11

Create an email in Excel and attach the file as a PDF

  1. #1
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Create an email in Excel and attach the file as a PDF

    Hi,

    I have the following code but I need to be able to add the file itself to the email as a PDF attachment. Any help greatly apprecaited!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Create an email in Excel and attach the file as a PDF

    Maybe:
    Please Login or Register  to view this content.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Create an email in Excel and attach the file as a PDF

    Hi Solus,

    Thank you so much for your reply. I am farily new to coding so would appreciate a little help in explaining your code please. Do I just copy your code or does it need to fit in mine somewhere and if so where?

    Thanks

  4. #4
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Create an email in Excel and attach the file as a PDF

    Hi Solus,

    That works great!! Thank you! One slight request.....how would I adapt the code to create a PDF of just one of the worksheets rather than the whole workbook?

    Also, the hyperlink in my email isn't working........I assume it is something to do with the way I have written the file path or is it to so with my works drives?

  5. #5
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Create an email in Excel and attach the file as a PDF

    Hi,

    Have managed to adapt the code for just the Active Sheet

    Just got the issue of the hyperlink not working now! Any help would be appreciated.

    Thanks
    D

  6. #6
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Create an email in Excel and attach the file as a PDF

    Quote Originally Posted by MissDB View Post
    the hyperlink in my email isn't working
    Hi,

    Can you be more specific? Hyperlink in the body of the email or hyperlink that was in the Excel sheet not working the attached PDF?

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  7. #7
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Create an email in Excel and attach the file as a PDF

    I can get a hyperlink into the email but when I click on it, it says it cannot find the file, but I know the file is there.

  8. #8
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Create an email in Excel and attach the file as a PDF

    How and where is the hyperlink placed?

  9. #9
    Forum Contributor
    Join Date
    03-10-2014
    Location
    Sheffield
    MS-Off Ver
    Excel 2010
    Posts
    180

    Re: Create an email in Excel and attach the file as a PDF

    I have the filepath in a cell in the spreadsheet. The code I use is as below. Also I really need the file path to be entered into a cell when the owner saves it somewhere so that the code picks the new file path up. At the moment I manually enter the file path.

    Please Login or Register  to view this content.

  10. #10
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Create an email in Excel and attach the file as a PDF

    Which cell is it in?

  11. #11
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Create an email in Excel and attach the file as a PDF

    Since you have started a new thread here: http://www.excelforum.com/excel-prog...-with-vba.html to answer this question, please mark this thread as [SOLVED] using the thread tools at the top.

    And on any thread you can show your appreciation to those who have helped you by clicking the * below their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Trying to create a .pdf and attach it to email, but get .xls file instead
    By sbrnard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2013, 01:21 PM
  2. [SOLVED] Macro to create a pdf and attach to an email (Outlook)
    By jsedore in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-01-2013, 03:16 PM
  3. [SOLVED] Attach a file and email it using Excel.
    By Paul Morgan in forum Outlook Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2012, 09:32 AM
  4. Code to create PDF, attach to email and send to distribution list
    By tim_chisman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-18-2010, 09:08 AM
  5. Email workbook AND attach a separate file to the email
    By sgreni in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-15-2009, 06:48 PM

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