+ Reply to Thread
Results 1 to 8 of 8

VBA Code not communicating with Outlook

  1. #1
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    VBA Code not communicating with Outlook

    Hi,

    I am using Ron's code to send emails from the outlook client. I managed to make it work and it was fine 2days ago. Today for some reason is not communicating with Outlook to send the emails. I tried Ron's samples and they are functioning without a problem, but not the modified code. I have attached the code below and was wondering if someone could be kind enough to have a quick look and help me please.

    Please Login or Register  to view this content.

    Thank you very much

    greekboyuk
    Last edited by NBVC; 01-20-2011 at 04:40 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Code is not functioning

    The workbook with some sample data would be useful.

    How far does it get? Does it do nothing? Does it do something and then fail? If it fails, does it give an error message?

    The first thing to try is to comment out any/all error trapping; then run the code and see what it does. The chances are it will highlight a problem that has been introduced.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: Code is not functioning

    Hi thank you for your reply.

    I have attached a sample of the wkb.

    Many Thanks
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: Code is not functioning

    hi , is the sample sufficiant or you need more info?
    Many Thanks

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Code is not functioning

    Is it the email element that is failing? or the code to determine what information is to be sent and to whom?

    I'll have another look later and see if I can spot anything.

    Regards

  6. #6
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: Code is not functioning

    Hi, the code is running and ending without a result. It looks like is not bringin the outlook client up. The data is not sent. I can't understand it as I had the exact code and structure 2days ago and it was uploading and sending the spreadsheet without a problem. The only thing that was edited was the subject line a bit more text and that was all. When I try to run it step by step when it filters the data and copies it in a new sheet is blank. I am not sure whether could be something there

    Thank u for taking the time and helping it is much appreciated

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: VBA Code not communicating with Outlook

    I'm not entirely sure what's meant to happen. However, stepping through the code, the Advanced Filter is not picking up any records to copy them to the temporary CWS worksheet. Consequently, Rcount is 0 and the test for Rcount >= 2 fails. The bulk of the code is skipped and the code clears up after itself and exits.

    Please Login or Register  to view this content.

    Have you restructured the MailManagers worksheet?

    Regards

  8. #8
    Forum Contributor
    Join Date
    01-26-2010
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    162

    Re: VBA Code not communicating with Outlook

    Hi, thank you for replying. It should unique filter the managers name in the MailManagers sheet copy that data in a new sheet, and email it to that manager then filter next person if any and do the same. The structure of MailManagers didn't change apart from the location of external data but that wad updated in the source. Any ideas what do I do please?

    Many thanks

    Greekboyuk

+ 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