Solved

Running an excel macro using Domino LotusScript

Posted on 2007-03-29
6
1,068 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Expert Comment

by:stltt
Comment Utility
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
Comment Utility
Thanks, marilyng. You've come through for me again!
0
 
LVL 18

Expert Comment

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

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

728 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

11 Experts available now in Live!

Get 1:1 Help Now