+ Reply to Thread
Results 1 to 3 of 3

Office Script Open Excel

  1. #1
    Forum Contributor
    Join Date
    06-26-2014
    Location
    Houston
    MS-Off Ver
    365
    Posts
    201

    Office Script Open Excel

    Hi,

    I am looking to write a code in Office Scripts. I am trying to open a spreadsheet, then send it as a PDF to a list of people, every morning at a certain time. I cant quite figure it out. I have an Automate flow to start trigger in the morning, and Run a Script, but I cant quite get the script right. Help?

    Thanks

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Office Script Open Excel

    You can automate tasks using the windows task scheduler. The windows task scheduler can open an Excel file, but cannot run a macro. An Excel file can open another Excel file and run a macro. The attached has the files and explains the system to do this.

    First you create the Excel program that makes the PDF and mails it. This is known as the target file. Then you clone the Control Template and give it a meaningful name. You fill in certain cells in the Control Template and, among other things, it gives you the script you need in the windows task scheduler. Copy this to notepad.

    Then set up the windows task scheduler to run the renamed control template. At the appropriate time, the windows task scheduler opens the control template, which in turn, runs the macro in the target program.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    12-30-2021
    Location
    Toronto
    MS-Off Ver
    365
    Posts
    51

    Re: Office Script Open Excel

    If you don't change the excel file at all, no need to write any code. The first step of your flow is "Convert file" and the second step is "Send an email".

    If you do need to change the file, the Scripts code is just as same as what you normally write.

+ 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. [SOLVED] Problem Debugging Microsoft Office Script in Excel
    By beaverbuzz85 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-22-2022, 01:50 PM
  2. Excel Online Office Script : Arrays and setValues problem
    By cedric007 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-15-2021, 07:35 AM
  3. Office script Export chart from excel
    By ubludkisranye in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-04-2021, 07:42 AM
  4. Script or .bat needed to open office file file located in LAN
    By 823 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2015, 11:06 AM
  5. Replies: 5
    Last Post: 12-10-2013, 01:27 PM
  6. [SOLVED] How to create a script to trust an assembly - Excel 2003 - Office System Project with C#
    By John Yung in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-06-2005, 10:05 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