![]() |
KnowBrainer Speech Recognition | ![]() |


|
Topic Title: how to call an excel macro from Dragon Topic Summary: VBA to call a macro from excel? Created On: 04/23/2012 08:32 PM Status: Post and Reply |
|
![]() |
- gabor5454 | - 04/23/2012 08:32 PM |
![]() |
- R. Wilke | - 04/24/2012 09:14 AM |
![]() |
- bk82 | - 04/24/2012 04:47 PM |
![]() |
- gabor5454 | - 04/24/2012 10:24 PM |
![]() |
- JoeBu | - 04/27/2012 03:20 PM |
|
|
|
|
I am using dragon pro 11.5 and I want to use an excel macro in a scripted command I understand the syntax for calling a word macro is word.application.run "macroName" with a reference set to word (which I am having success with) Is there a comparable VB line for excel? I have tried a few things and seem to be missing it . I have tried inserting the VBA code directly (I am using Larry Allen's excellent book) - I can get excel to open and create the workbook as he describes, but when I try pasting the code that works in excel directly into dragon it does not run - It seems easier to simply call the macro that works, if I can. Thanks in advance Ricky
to be exact - I want to open a new instance of excel, run the macro, then close excel - the macro sends its output to the clipboard, so I don't need to save the workbook |
|
|
|
|
|
|
|
|
Ricky, the path of least resistance is to assign a keyboard shortcut to execute the macro from within Excel, and then call the shortcut via Advanced Scripting from Dragon, using a simple SendKeys command. Rüdiger
------------------------- Well, it's past the point where we can make any changes in the code, but we can still make changes to the Easter Egg! |
|
|
|
|
|
|
|
|
I second that. Executing macros via Advanced Scripting using a reference to Excel or using the "path" to the macro have often resulted in errors. The hotkey solution is the best one.
------------------------- DNS 12 Pro, Medical, Premium - German, English, French - Dragon Dictate 3.0, dns.comfort
Core i7 950, Windows 7 Ultimate 64-bit, Intel Core i7 950, 12 GB RAM, L2 2MB; Mic: Jabra Chromo NC 2400 USB.
|
|
|
|
|
|
|
|
|
Thanks - this does work nicely, and is what I had been using from Knowbrainer. I worry a bit about running out of hotkeys as I write more macros, but I guess I can cross that bridge when I come to it. Ricky |
|
|
|
|
|
|
|
|
Hello Ricky, regarding your worries about running out of hotkeys I propose the following. You will be able to run excel makros with using keystrokes. Even if they are writeprocted. First you have to check what are the keystrokes combination to run an excel makro. Press the alt-key and then have a look what is the key-combination. The german code for Excel 2007 is: Sub Main Or Sub Main kind regards Joe ------------------------- Work: DNS 12 Pro German, Windows 7 64bit, 8GB RAM, Intel i7 Q820 Home: DNS 12 Pro German, Windows 7 64bit, 8GB RAM, Intel Core 2Duo E8400
|
|
|
|
|
FuseTalk Standard Edition v4.0 - © 1999-2013 FuseTalk™ Inc. All rights reserved.