-
Up!
Having the same problem, but have no solutions.
2009-11-26 13:10:17 UTC by https://www.google.com/accounts
-
hi all
I used this method to get the word document's property,
Dispatch.call(wordDoc, "BuiltInDocumentProperties",WdBuiltInProperty.wdPropertyPages)
but it only return com.jacob.com.Dispatch@18eb9e6
how to get the right value?.
2009-11-19 01:48:34 UTC by paulzhong
-
I realize this question has been submitted a few times in a few different ways but so far nobody has answered any of them.
How do I call the following function using JACOB?
[id(25), helpstring("method GetPrinters")] HRESULT GetPrinters([in] ConnectionTypeEnum conType, [out] VARIANT* printerList);
I only seem to have issues with VARIANT* as out parameters. I have tried everything that I...
2009-11-18 23:17:54 UTC by ringholm9
-
Hi!
I'm deploying my tool with the jacob-classes included in the app's JAR.
The last step would be obfuscating...
This fails, because a class called "BaseTestCase.class", which is referenced by Jacob, is missing ("com/jacob/test/BaseTestCase.class").
It does not matter which obfuscator I use, the class can't be found.
And yes, there is no "BaseTestCase" class...
At first I...
2009-11-14 18:27:26 UTC by mccae
-
hi,
I try to use jacob to open an word document,the code like this:
ActiveXComponent app = new ActiveXComponent("Word.Application");
Dispatch word = app.getObject();
Dispatch.put(word, "Visible", new Variant(visible));
Dispatch documents = app.getProperty("Documents").toDispatch();
Dispatch doc = Dispatch.call(documents, "Open", docPath).toDispatch();
when i run these code in...
2009-11-13 10:43:26 UTC by yansj
-
I once used:
Dispatch.call(myDispatch, "myFunction", new Variant("myString"));
which worked.
Perhaps the difference is that I used a Dispatch as 1st parm. I created that by:
Dispatch myDispatch = myActiveXComponent.getObject();
Hope this helps,
Hans.
2009-11-09 22:30:47 UTC by hanspattenier
-
Never mind the race condition was my coding problem. I added variables in the STA for the ActiveXComponent and its DispatchProxy. I accidentally initialized them in the variable declaration and in the OnInit. Initializing only in the OnInit seems to fix the problem.
2009-11-03 00:19:35 UTC by daleking
-
OK, that seemed to be the problem. I put the code to create the object inside an STA, added a DispatchProxy and am now getting events.
But I am seeing weird behavior with sometimes getting events and sometimes not. I'm thinking it was a race condition between the STA thread and my main thread, but everything I try, I still sometimes don't get my events.
2009-11-03 00:07:40 UTC by daleking
-
I have determined that when DispatchEvents is created that SAPI is calling the EventProxy's QueryyInterface to check if it has that interface, but the invoke is never called.
I am wondering now if the problem may be that it is using a technique I have seen elsewhere where it requires a windows message pump to be implemented by the thread that does the initialization. I have seen this before...
2009-11-02 22:26:22 UTC by daleking
-
I am trying to use JACOB to interface with Microsoft SAPI. I can make the calls into SAPI, but I seem to be completely unable to receive events from SAPI.
Here is some test code I put in an excel worksheet with a button and a text box to test events in visual basic:
Dim WithEvents Voice As SpVoice
Private Sub CommandButton1_Click()
Set Voice = New SpVoice...
2009-11-02 15:25:42 UTC by daleking