Solved

Running an excel macro using Domino LotusScript

Posted on 2007-03-29
6
1,109 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Creating a new theme in discussion8.ntf 6 174
Lotes Notes 8.5.3 std can not open calendar 2 122
Add a cc field to email code 6 102
Migration Lotus to Exchange 2016 4 221
  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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

730 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