none
VBScript (.vbs) file Not Running Outlook Procedure / Macro RRS feed

  • Question

  • I can run it manually inside Outlook, however problems trying to call the Procedure so that I can add it to Windows Task Scheduler to run at a certain time each day.

    So I've tried .bat and .vbs and neither is working.

    Object doesn't support the property or method:

    'myOutlook.SendNewestFiles'

    CODE

    Set myOutlook = CreateObject("Outlook.Application")
    myOutlook.ThisOutlookSession.SendNewestFiles or myOutlook.SendNewestFiles
    myOutlook.Quit
    Set myOutlook = Nothing 
    as well as the switch for Office 2016 in Task Scheduler

    CODE

    "C:\.... Outlook.exe" /mSendNewestFiles 

    Anyone know the correct VBS code to launch and run an Outlook Macro?
    Or another way?

    I tried the Application_StartUp but do not want to have it run every time Outlook is opened.
    Otherwise have to open in Safe Mode to use Outlook regularly.


    • Moved by Bill_Stewart Wednesday, May 30, 2018 7:31 PM Off-topic
    Thursday, April 5, 2018 3:50 AM

All replies