0

I don't have much knowledge in creating a VBScript file. I have a code i want to automate to send email out every month. With some research i found the code below:

dim EXL
    set EXL = CreateObject("Excel.Application")
    'not required
    EXL.Visible = true

    'your file and macro    
    EXL.Workbooks.Open "full path to your excel file including extension here" 
    EXL.Run "Fixing"

    'close everything
    EXL.Quit
    Set EXL = Nothing

My Question is: do i implement this code into my excel module or is in the worksheet event?

Once i have this correctly applied i will be able to set the Windows Task Scheduler to run at the particular time.

1
  • 2
    Just save the VBscript file as a *.vbs file. Create a text file (txt), copy your code and save the file with the vbs extension. Next go to the Windows Task Scheduler and choose Run a Program and locate your VBS Commented Jun 2, 2015 at 10:30

1 Answer 1

1

Just save the VBscript file as a *.vbs file. Create a text file (txt), copy your code and save the file with the vbs extension. Next go to the Windows Task Scheduler and choose Run a Program and locate your VBS.

Sending emails from VBscript

http://www.analystcave.com/excel-send-email-excel-workbook/

Scheduling programs to run in Windows

http://windows.microsoft.com/en-au/windows/schedule-task#1TC=windows-7

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.