+ Reply to Thread
Results 1 to 5 of 5

Error calling Outlook 2010 macros from Excel 2010

  1. #1
    Registered User
    Join Date
    12-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Error calling Outlook 2010 macros from Excel 2010

    I recently upgraded from 2007 to 2010 and the following code snippets no longer work:

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.
    The first snippet is in an Excel module. The second is in Outook ThisOutlookSession.

    This USED TO WORK - as is - until I upgraded.

    Now, I get an error on the noted line: Run-time error '438': Object doesn't support this property or method.

    I have tried everything I can think of, and everything I could find online (very little). Thank you in advance for your assistance.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Have you tried putting the Outlook code in its own module?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Error calling Outlook 2010 macros from Excel 2010

    I had not tried that, but it had no effect.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    If you didn't try it how do you know it had no effect?

    By the way, what does the code in Outlook do?

    Is it anything you could automate from Excel?

  5. #5
    Registered User
    Join Date
    12-11-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Error calling Outlook 2010 macros from Excel 2010

    By the way, what does the code in Outlook do?
    Ok, well.. you asked..

    I built out a macro in Outlook which works like an advanced rule manager. It does a number of things such as (smart) auto replies, saving attachments, firing off SQL jobs, opening for immediate attention, intelligently deciding what folder to save emails to, append a comment to a txt log, deleting unnecessary large attachments, running other macros, et cetera. Basically, stuff that's too involved for the simple rules Outlook provides you with. There are (at last count) 2,008 "rules" which it runs against every incoming email. Yes, I am thoroughly aware that this is completely insane, but I get a LOT of email, and I'd go nuts if I had to handle it all manually.

    Sometimes, it's necessary to run these jobs historically on the 50 most recent emails, for example, rather than just the most recent one. This becomes especially important in the middle of a complicated close-of-day series of macros I run in Excel. Previously, if my macro deemed it worth doing, it would call a macro in Outlook called Use_rule(num) (where num specifies how many emails back to look at), but now it crashes when trying to do this. However, the job works fine when run from Outlook directly. So the only option, at present, is to show a msgbox telling the user to go to Outlook, trigger a separate macro there and then come back to Excel and resume. (Unfortunately, my users are.. well let's just say it's best to make things as simple as possible for them).

    Is it anything you could automate from Excel?
    There were about a dozen other issues (mostly centered around creating emails from data on spreadsheets), but I've been able to program around those. (2010 seems to be much more capable than 2007 in this regard). The only thing I can't seem to get around is remotely running this macro.

    That said, I do see a "third way," but it's far from optimal: I can fire off an email from Excel to myself, then have Outlook watch for that email and respond by running the macro. It's pretty cludgey though and I'd really like to get this working right, the way it used to.

+ 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. Linking emails (Outlook 2010) to Excel 2010
    By nickm84 in forum Excel General
    Replies: 0
    Last Post: 12-16-2012, 05:43 AM
  2. Excel 2010 to OutLook 2010 Meeting Request Problems
    By tigerdel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-29-2012, 03:58 AM
  3. Need to Copy Outlook 2010 Mail message to Excel 2010
    By pradeepdeepu_001 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2012, 11:35 PM
  4. Excel 2010 to auto-generate an email to recipients in outlook 2010
    By dmcmillo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2012, 05:13 PM
  5. Having Excel 2010 auto-generate an email to recipients in outlook 2010
    By dmcmillo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2012, 08:23 AM

Tags for this Thread

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