[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1144
  • Last Modified:

Running an excel macro using Domino LotusScript

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
notesrookie
Asked:
notesrookie
1 Solution
 
Bill-HansonCommented:
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
 
SysExpertCommented:
You might try testing with te Sendkey function  to send keystrokes to the Excel application.

I hope this helps !


0
 
marilyngCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
stlttCommented:
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
 
notesrookieAuthor Commented:
Thanks, marilyng. You've come through for me again!
0
 
marilyngCommented:
You're welcome.. just had to do this the other day, so you were in luck.
0

Featured Post

Independent Software Vendors: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now