How to access the task manager from Lotus Script

Posted on 2008-11-07
Last Modified: 2013-12-18
We have Lotus Notes web and scheduled agent running on Domino on top of  Windows NT.

Those agents are using Lotus Script to activate EXCEL using
Set Excel = CreateObject( "Excel.Application" )            

However before I start to execute this line I would like to check if Excel is already running on the server and if active wait till it is finished. Running more than one instances of Excel at the same time seems to cause problem such as server crash.

We have set the number of concurrent agents to 1 so we do not have a problem with web agents but we still have conflicts between scheduled agents using excel and web agents which also use excel.

Any idea is more than welcome

Question by:YvesSy
    LVL 22

    Expert Comment

    The correct way to get a COM object is to first use GetObject to get a running instance (if any), then fail over to CreateObject if the app is not already running.


    Set Excel = GetObject( "", "Excel.Application" )
    If (Excel Is Nothing) Then Set Excel = CreateObject( "Excel.Application" )

    Since you are trying to wait for Excel to close, you could try this:

    Do While (True)
          Set Excel = GetObject( "", "Excel.Application" )
          if (Excel Is Nothing) Then Exit Do
          Set Excel = Nothing
    Set Excel = CreateObject( "Excel.Application" )
    LVL 46

    Expert Comment

    by:Sjef Bosman

    Accepted Solution

    The problem is that the system did create the object but is was stuck. I solved the problem by creating a Queue for the excel jobs which is executed by a scheduled agent running every 15 minutes

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
    Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
    This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
    This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now