+ Reply to Thread
Results 1 to 8 of 8

How to Schedule Outlook Macro to run daily at specific time

  1. #1
    Registered User
    Join Date
    06-18-2014
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    18

    Question How to Schedule Outlook Macro to run daily at specific time

    Hi,

    There are some specific email addresses from which I get emails everyday at specific times. These emails have some excel file attachments which I need to use for some reports. I have a VBA macro saved in my Outlook 2013 which I need to manually run on daily basis to automatically download and move those files to specific folders on my hard drive. Now, I am in process to fully automate my entire report for which I need my Outlook macro to run on a defined time. The next steps to use those excel files are already automated.

    I tried to do it through Windows scheduler (OS - Windows7) but it seems it doesn't work that way.

    Can someone please help me on this - It would be really great.

    Best Regards,
    Shaurya
    Best Regards,
    Shaurya

  2. #2
    Forum Contributor
    Join Date
    08-27-2006
    Posts
    136

    Re: How to Schedule Outlook Macro to run daily at specific time

    You can tweak this http://www.vboffice.net/sample.html?...0&cmd=showitem to call the report code.

    You should be able to set recurrence in the task rather than creating a new daily task in the code.

    Further reading. You can initialize in Application_Startup in ThisOutlookSession. http://msdn.microsoft.com/en-us/libr...ffice.15).aspx
    To mark "Solved" go to Thread Tools.

  3. #3
    Registered User
    Join Date
    06-18-2014
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    18

    Re: How to Schedule Outlook Macro to run daily at specific time

    Hi Skatonni,

    Thank you for looking and replying to this thread. I am afraid to say that it didn't helped me as the code mentioned on that URL is to schedule an auto email. However, my issue is with regards to saving attachments from the emails at specific time on daily basis where my Outlook application remains opened on the PC always.

    Kindly suggest.

  4. #4
    Forum Contributor
    Join Date
    08-27-2006
    Posts
    136

    Re: How to Schedule Outlook Macro to run daily at specific time

    The link was to give you the idea of using a task to schedule your report.

    Let us say your code is MyReport. Set up a recurring task with subject "Run my report", with a reminder.

    The reminder event calls your code. (I note that I threw in "further reading" that did not apply.)

    In This OutlookSession module.

    Please Login or Register  to view this content.
    In a normal module.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-18-2014
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    18

    Re: How to Schedule Outlook Macro to run daily at specific time

    Hi Skatonni,

    Firstly, Thank you once again for your kind reply. Let me provide you a brief details as what I have done so far:
    My Macro code in Outlook are saved within 'ThisOutlookSession' only. Then I have activated an outlook rule also. All I want is to do that when an email I receive from specific mail sender, it would first move those emails under the desired folder. And then it should run my Macro. This code is working successfully by running manually. But it's not working through the outlook rule automatically. Hope I have explained my concern thoroughly.

    Below is the complete code details which I am using in the outlook macro for your purusal.

    Please Login or Register  to view this content.
    Kindly Help.

  6. #6
    Registered User
    Join Date
    06-18-2014
    Location
    New Delhi
    MS-Off Ver
    2013
    Posts
    18

    Re: How to Schedule Outlook Macro to run daily at specific time

    Please let me know your thoughts about it.

  7. #7
    Forum Contributor
    Join Date
    08-27-2006
    Posts
    136

    Re: How to Schedule Outlook Macro to run daily at specific time

    The thread question is "How to Schedule Outlook Macro to run daily at specific time". You have my answer but the code must be in a format that can run manually. It seems this question is premature.

    ******************************************************

    You can run RunAScriptRuleRoutine through a rule. RunAScriptRuleRoutine does nothing.

    You can run LPWirelineExtract_Data manually. LPWirelineExtract_Data does nothing.

    Application_ItemSend runs when you send. Your Application_ItemSend does nothing.

    Quote Originally Posted by spriyatam View Post
    ... All I want is to do that when an email I receive from specific mail sender, it would first move those emails under the desired folder. And then it should run my Macro. This code is working successfully by running manually. But it's not working through the outlook rule automatically...
    Mail can be moved to Outlook folders by rule conditions without VBA.


    Quote Originally Posted by spriyatam View Post
    ... All I want is to do that when an email I receive from specific mail sender, it would first move those emails under the desired folder. And then it should run my Macro. This code is working successfully by running manually. But it's not working through the outlook rule automatically...
    SaveEmailAttachmentsToFolder requires parameters to be passed to it. I cannot see how any code could be "working successfully by running manually".

    I believe the question for your new thread could be "How to pass parameters to code that saves attachments". Include the code for SaveEmailAttachmentsToFolder.

  8. #8
    Registered User
    Join Date
    04-26-2011
    Location
    oklahoma city
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: How to Schedule Outlook Macro to run daily at specific time

    Skatonni, thank you for this post - wanted you to know it still works great!!! (using Outlook 365)

+ 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. How to send excel file automatically through outlook on specific time daily.
    By ashok155 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-25-2014, 09:08 AM
  2. Daily Schedule time line
    By hussai7 in forum Excel General
    Replies: 0
    Last Post: 03-14-2013, 10:36 AM
  3. Schedule Macro at specific day & time?
    By jasonfish11 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-23-2012, 03:11 PM
  4. Daily Schedule chart (time duration)
    By EarthWeek in forum Excel General
    Replies: 4
    Last Post: 03-22-2012, 01:33 PM
  5. daily schedule in excel, import to outlook?
    By psy in forum Excel General
    Replies: 3
    Last Post: 03-21-2012, 08:23 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