Calling Word OLE method with multiple arguments
I am writing a script in DXL which needs to send 2 arguments to a Word function. I assume that the arguments need to be sent (or "put") in the order they appear in the function's definition. When I run the OLE method, however, I keep getting the following error message:
I have been trying to figure out what this error code means, but have yet to find this exact error number. Here is the DXL code I'm using to run the macro:OLE problem: , OLE error code: -2147352562
objWord = oleCreateAutoObject("Word.Application");
if(null objWord)errorBox("Unable to open word application");
//Open the docm file, insert contents of newly created HTML file and save as .docolePut(objWord, "Visible", true);oleGet(objWord, "Documents", objDocs);put(autoArgs, sHTMLFileName);oleMethod(objDocs, "Open", autoArgs, objDoc);
put(macroArgs, nameOfMacro);put(macroArgs, CMG_USER_DESKTOP);put(macroArgs, sLastBL);
sErrorMess = oleMethod(objWord, "Run", macroArgs);if (!null sErrorMess) infoBox(sErrorMess);
And the function in Word is:
Sub SaveHTMLAsDoc(sPath As String, sBaseline As String)
Am I adding the arguments in the wrong order? It would be GREATLY appreciated if someone knows how to fix this problem I've had for quite some time.
Chris