+ Reply to Thread
Results 1 to 5 of 5

CDO with Attachment Help!

  1. #1
    Forum Contributor
    Join Date
    06-17-2013
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    247

    CDO with Attachment Help!

    Hi Guys!

    So im using CDO to automate emailing some excel files i have updated everyday.

    These files get saved with tomorrows date - and everytime i try to attach a file it says cannot find specific file.. now if i specify the name exactly then it works however i want this to run even when i am not here so i need vba to recognize tomorrows date and im not sure why its not working as im using the same method to save the file name with tomorrows date?

    Please Login or Register  to view this content.
    i get error - the system cannot find the specified file.

    Any ideas? ~ have tried using autoit to send CDO email but couldnt get it working either

  2. #2
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Ontario Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: CDO with Attachment Help!

    Try adding this below your CDO_Mail_Object.AddAttachment and compare to your file name.
    Make sure your immediate window is showing.
    It might show you something you couldnt see before.
    I find the Local, Watch and Immediate windows to be very helpful for debugging.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    06-17-2013
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    247

    Re: CDO with Attachment Help!

    Hi Jason,

    not too sure how i use this? doesnt do anything for me lol

  4. #4
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Ontario Canada
    MS-Off Ver
    Excel 2010
    Posts
    124

    Re: CDO with Attachment Help!

    Haha is your immediate window showing?
    Open up the VBA editor and go to View->Immediate Window
    Or I think Ctrl+G also works.
    When you do that, the debug.print line will "print" the variable in the immediate window

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: CDO with Attachment Help!

    A filename is case insensitive:

    Please Login or Register  to view this content.



+ 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. No Attachment
    By bnwash in forum Suggestions for Improvement
    Replies: 4
    Last Post: 06-07-2013, 12:46 PM
  2. attachment
    By massive_set in forum Excel General
    Replies: 1
    Last Post: 01-14-2013, 03:34 AM
  3. Attachment manipulation based on string in attachment
    By fterveen in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2012, 08:40 AM
  4. PDF as attachment
    By nuttycongo123 in forum Outlook Programming / VBA / Macros
    Replies: 12
    Last Post: 05-28-2011, 03:11 PM
  5. Please help me according to attachment
    By 9813268329 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-01-2010, 07:24 AM

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