+ Reply to Thread
Results 1 to 5 of 5

Attach PDF located in special folders into email

  1. #1
    Registered User
    Join Date
    10-07-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Attach PDF located in special folders into email

    In this I have already accomplished creating the PDF, and saving in a specific folder across multiple platforms. The trouble I am having is attaching ANY sort of attachment. I have declared names and references, and none work.

    I have tried to remove and change all parts of GetObject("WScript.Shell").SpecialFolders, but get errors before the process is complete when I do that. How can I Re-access the desktop across multiple windows versions, in order to attach the file that was just created to an email that otherwise successfully generates?



    Please Login or Register  to view this content.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Attach PDF located in special folders into email

    I don't know about your Code in general but for this line of Code I believe you need to eliminate the trailing backslash. Change this
    Please Login or Register  to view this content.
    to this
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    10-07-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Attach PDF located in special folders into email

    No bueno @jaslake. Tried that prior, and after your post. Thanks for helping though!

    I think it has something to do with GetObject("WScript.Shell").SpecialFolders("Desktop")

    I tried replacing the above line with
    Please Login or Register  to view this content.
    and the attachment was successful.

    However, this will not provide the link to "Desktop\Program\Reports\" for multiple users, and Environ will not work either due to multiple excel & windows versions.
    Last edited by kingkyle2005; 10-19-2013 at 05:54 PM.

  4. #4
    Registered User
    Join Date
    10-07-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Attach PDF located in special folders into email

    Figured it out, not sure why it works now, but it does.
    Please Login or Register  to view this content.

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Attach PDF located in special folders into email

    Glad you got it sorted...

+ 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. Need to attach Image from special folders(multiple platforms), into body of email
    By kingkyle2005 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2013, 11:26 AM
  2. Launch email and attach open workbook to email?
    By mlefkowitz in forum Excel General
    Replies: 0
    Last Post: 09-11-2012, 02:01 PM
  3. SaveAs PDF and attach to email macro won't attach?!
    By Rerock in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-25-2012, 05:28 PM
  4. Replies: 0
    Last Post: 08-04-2010, 10:51 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