+ Reply to Thread
Results 1 to 6 of 6

how to amend the vba in outlook to a VBScript?

  1. #1
    Registered User
    Join Date
    10-23-2019
    Location
    HONG KONG
    MS-Off Ver
    2010
    Posts
    8

    Question how to amend the vba in outlook to a VBScript?

    Hi all,

    here is the code of my VBA in outlook,

    as i want to put it in the task scheduler to run it on a fixed time daily.

    but how can it be done?

    Please Login or Register  to view this content.
    Many thanks all.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: how to amend the vba in outlook to a VBScript?

    VBS is very similar to VBA, and VBA legacy in any version, for that matter. for instance, the MGSBOX is the same statement between the two. you biggest hurdle, more than likely, will be to try and find out if the outlook object references in your code, like the MAPI line, can be done in VBS. more than likely it can.

    however, why do you need a shell language? why not just open outlook and run your code by way of a TS timer? that's what you want to do anyway, right? some IT departments actually block VBS files from running because it is looked at as malicious. you can open literally anything with the TS in windows, if I'm not mistaken.

  3. #3
    Registered User
    Join Date
    10-23-2019
    Location
    HONG KONG
    MS-Off Ver
    2010
    Posts
    8

    Re: how to amend the vba in outlook to a VBScript?

    Many thanks for your reply
    Yes you are right, my purpose is to run the ooutlook macro daily at a specific time.
    as I have some excel macro and it is easy to convert them into vbs for a task scheduler to run. therefore it become my first thought to convert the outlook macro to a vbs file.
    how can I run the outlook macro in task scheduler without using vbs?

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: how to amend the vba in outlook to a VBScript?

    I don't run tasks often. can't be much help there.

    https://www.google.com/search?q=outl...task+scheduler

    looks like many have already done it, and can assist you.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,745

    Re: how to amend the vba in outlook to a VBScript?

    @a166769344

    I am sure that someone will be able to assist you - please be patient. I have closed your duplicate thread - please don't open duplicates in future.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: how to amend the vba in outlook to a VBScript?

    A working file would be of great assistance, as per the the yellow bannner above. Until then, the way to do this is associate a code in the workbook_open event that calls your code. Once your file is then loaded into the task scheduler to run at a specific time in the day, the file will open and trigger the email code. Here is a link to a similarly solved case. https://www.excelforum.com/excel-pro...n-30-days.html
    Last edited by maniacb; 08-28-2020 at 02:58 PM.

+ 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. What is the difference between VBscript and VBA ?
    By Analyst157 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-25-2018, 04:38 AM
  2. [SOLVED] Help in VBScript....
    By abhijit2610 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-21-2016, 02:18 PM
  3. I have a Question in VBScript..
    By anus in forum Excel General
    Replies: 2
    Last Post: 08-29-2013, 07:45 AM
  4. CSV/XLS via VBScript
    By Leonidars in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-13-2012, 08:24 AM
  5. macro will not run from vbscript. help please
    By vedran in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2006, 10:45 AM
  6. Please help with ADO and VBScript!
    By jenhu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2006, 01:10 PM
  7. Outputting Outlook Form to Excel using VBscript
    By guzzy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2005, 02:18 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