|
Post by drybsmt on Jun 29, 2022 14:06:27 GMT
I am trying to have a Word macro load and run MMM,
Sub openMMM()
Dim Macro As String
Macro = "D:\Dropbox (DRYBSMT)\Software\Mini Mouse Macro\WordAutomation\SaveToMax.mmmacro"
Shell ("D:\Dropbox (DRYBSMT)\Software\Mini Mouse Macro\minimousemacro.exe /m /d:0001" & Macro)
End Sub
The error says: Error loading with arguments
Is there an issue the code?
|
|
|
Post by philranger on Jun 29, 2022 22:00:37 GMT
Hello I’m not familiar with launching external programs from vba but isn’t there a space missing before macro ?
Shell ("D:\Dropbox (DRYBSMT)\Software\Mini Mouse Macro\minimousemacro.exe /m /d:0001 " & Macro)
|
|
|
Post by Steve on Jul 3, 2022 1:18:37 GMT
Have a look at the command line switch options at the FAQ link. With version 1.4+ command line switches were introduced. Command line switches are used for scripting Mini Mouse Macro and also allow the app to be task scheduled in Windows. The command line options and syntax are below:
MiniMouseMacro [/?] [/h] [/l:x] [/m] [/e] [/d:x] ["file path"]
Options:
/h - Display this help menu /? - Display this help menu /l:x - Enable loop option for macro (0 = infinite) /m - Minimize to tray /e - End program and close after macro (wins over /l:0) /d:x - Delay macro x amount of milliseconds ["file path"] - Path to .mmmarco macro file to load
Examples: MiniMouseMacro "d:\Macro Files\mymacro.mmmacro" - Runs the macro mymacro.mmmacro MiniMouseMacro /m /l:0 "d:\Macro Files\mymacro.mmmacro" - Runs macro minimized with the infinite loop option checked MiniMouseMacro /m /l:4 /e /d:2000 "d:\Macro Files\mymacro.mmmacro" - Runs macro minimized, loops 4 times, start delay of 2 seconds and exiting after completion.
|
|