Solved

Running an excel macro using Domino LotusScript

Posted on 2007-03-29
6
1,083 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

815 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

8 Experts available now in Live!

Get 1:1 Help Now