Solved

Running an excel macro using Domino LotusScript

Posted on 2007-03-29
6
1,098 Views
Last Modified: 2013-12-18
Greeting learned colleagues,

I am on Domino 7.0.1 and am trying to work with an existing spreadsheet using LotusScript. When this spreadsheet is opened normally and without LotusScript, it asks if you want to enable or disable macros. I click on "Enable macros" then another popup displays where I select the format of the file. I fill in the the name of the file to be produced, "TEST". Once the columns are filled in and in order to produce the TEST file you need to click on a button called "Prepare file". I can get a handle on the spreadsheet, open it and display it. What I need to figure out is how to enable macros, fill in that popup and after filling in the spreadsheet how do I "click" on the "Prepare file" button. I know that the name of the macro behind that buton is called "Prepare". I cannot change the macro in any way as it is password protected. Any help would be greatly appreciated. I'm awarding maximum points due to the urgency. Thank you, thank you, thank you.
0
Comment
Question by:notesrookie
6 Comments
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 18822721
This MS article explains how to create and run a macro using VBA.  It should have enouph info to get you started.

http://support.microsoft.com/kb/219905
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 18823590
You might try testing with te Sendkey function  to send keystrokes to the Excel application.

I hope this helps !


0
 
LVL 18

Accepted Solution

by:
marilyng earned 500 total points
ID: 18831775
Enable macros is part of the excel program options where you set the spreadsheet security.  If it were possible to do this via backend code, then the purpose of the security would be defeated.   If you decrease the security in excel, then the enable macros security box won't appear.  However, you then trust all macros to run.

I'm not sure sendkeys would work, because you'd still need to know from the operating system if the enable macros box is displaying before you can run the send keys function to enable the macros.

Running the macro appears in the application class:  xlapplication.ExecuteExcel4Macro(String As String)  Where String is the name of the macro to execute.  

0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Expert Comment

by:stltt
ID: 18853127
Possible option: Migrate the macro in Excel (I guess already is Basic code) into LotusScript and do all your code from there - then you have full control and do not need to enable macro when opening the document
0
 

Author Comment

by:notesrookie
ID: 18854819
Thanks, marilyng. You've come through for me again!
0
 
LVL 18

Expert Comment

by:marilyng
ID: 18854932
You're welcome.. just had to do this the other day, so you were in luck.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Migration: Lotus Notes to Exchange 2013 10 330
Only send email if contains "abcd" 3 148
Lotus Domino server 9 7 81
Code for extraction to mkdir folder 5 73
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

838 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