jacob

Java, Jacob and Microsoft Outlook events: Receiving “Can't find event iid” Error

≯℡__Kan透↙ 提交于 2019-12-19 10:29:22
问题 I am writing a Java program that interacts with Microsoft Outlook using the Jacob library (bridges COM and Java). This program creates a new MailItem, displaying its Inspector window to the user. I wish to subscribe to the inspector's Close event to know when the user is finished editing their mail item. To subscribe to the event, I followed the instructions in Jacob's documentation (about 2 ⁄ 3 down the page): The current [event] model is conceptually similar to the Visual Basic WithEvents

How to configure .dll file in Java?

回眸只為那壹抹淺笑 提交于 2019-12-18 04:12:38
问题 I am using Jacob jar file in my java application. This Jacob jar file comes with a .dll file. I have added Jacob jar file to my classpath. But when I execute my application a runtime error occurs as "couldn't load jacob-1.15-M3-x86.dll file" How can I load this .dll file? Edited:================================================================================= I had set the "path" environment varaible to the dir that contains my .dll file and loading that .dll file as follows static { System

将Unix时间戳转换为JavaScript中的时间

♀尐吖头ヾ 提交于 2019-12-12 21:35:56
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我将时间作为Unix时间戳存储在MySQL数据库中,并将其发送到一些JavaScript代码。 我怎么会得到时间呢? 例如,以HH / MM / SS格式。 #1楼 另一种方式-从 ISO 8601 开始。 var timestamp = 1293683278; var date = new Date(timestamp*1000); var iso = date.toISOString().match(/(\d{2}:\d{2}:\d{2})/) alert(iso[1]); #2楼 // Format value as two digits 0 => 00, 1 => 01 function twoDigits(value) { if(value < 10) { return '0' + value; } return value; } var date = new Date(unix_timestamp*1000); // display in format HH:MM:SS var formattedTime = twoDigits(date.getHours()) + ':' + twoDigits(date.getMinutes()) + ':' + twoDigits(date

Java, Jacob and Microsoft Word: how to properly handle events?

自古美人都是妖i 提交于 2019-12-12 04:49:10
问题 My goal is to write an java applet application that writes a word document(this document is fetched from DB)in a temporary directory on client machine and opens that document using Jacob. Through Jacob I need to keep the handle to the opened document, so that after the user closes the document I need to save it back to the DB with the changes. That said, the first thing I want to know is how to capture a close/exit event through Jacob when the user closes/exits the MS Word document . How can

setParameter for an array property with JACOB

佐手、 提交于 2019-12-12 04:44:22
问题 I have the following VB code : Set QuoteRequest = Quotes.Add With QuoteRequest .No = 1 .QuoteCode(0)="101" .Code(0)="NAME1" .Code(1)="NAME2" End With I use JACOB to access that COM object. quoteRequest.setProperty("No",1); quoteRequest.setProperty("QuoteCode(0)","101"); quoteRequest.setProperty("Code(0)", "NAME1"); quoteRequest.setProperty("Code(1)", "NAME2"); But this leads to exception com.jacob.com.ComFailException: Can't map to dispid: QuoteCode(0) How can I pass that property? 回答1:

Jacob: com.jacob.com.ComFailException: Can't co-create object

回眸只為那壹抹淺笑 提交于 2019-12-12 02:48:58
问题 I am facing exception Exception in thread "main" com.jacob.com.ComFailException: Can't co-create object while running the code below. I checked online for help. Some sites say that I need to register my dll. I tried registering using regsvr32.exe . But I am unable to register successfully. Getting below popup. The module "jacob-1.18-M2-x64.dll" was loaded but the entry-point DllRegisterServer was not found.Make sure that "jacob-1.18-M2-x64.dll" is a valid DLL or OCX file and then try again.

Delete and update Outlook contact using jacob library

不羁岁月 提交于 2019-12-12 02:33:25
问题 I am using jacob library. Using jacob library and following this tutorial i am able to add a contact in outlook. Now i want to delete and update that contact using jacob. i want to know is there any way to delete the outlook contact using jacob. I am using this code to add contact in outlook. here email id is unique id. ActiveXComponent axOutlook = new ActiveXComponent("Outlook.Application"); Dispatch oOutlook = axOutlook.getObject(); Dispatch createContact = Dispatch.call((Dispatch)oOutlook,

Jacob 1.14.3 DLL no detected by the java.libary.path using Eclipse

旧时模样 提交于 2019-12-11 21:13:50
问题 I am trying to implement the library JACOB to communicate to some payments devices such as PINPADs. I have created a java project but when the main class execute the method that use the DLL in the runtime gives a error no jacob-1.14.3-x64 in java.library.path Here you can find what I am using to build the project: Operating System: Windows 10 64bit JRE/JDK version: 1.8.0_181 64bit*( changed from 32 to 64bit )* Eclipse: Photon Release (4.8.0) Maven version: 3.5.4 JACOB version: 1.14.3 (Both

com.jacob.com.ComFailException: Can't co-create object

三世轮回 提交于 2019-12-11 18:37:26
问题 I'm using jacob to load system certificate. Its working fine when I run code using public static void main(String args[]) or say simple Java program but when I try to run code using Applet I'm getting error as follow... com.jacob.com.ComFailException: Can't co-create object at com.jacob.com.Dispatch.createInstanceNative(Native Method) at com.jacob.com.Dispatch.<init>(Dispatch.java:99) at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java:58) at com.digicorp.root.SystemWrapper$1

How to use JACOB in an OSGi application?

心不动则不痛 提交于 2019-12-11 12:58:53
问题 I have an OSGI (more precsiely a Wisdom framework-based) application in which i would like to use the JACOB library to interact with Office (the goal being to transform PPT into images). I can easily add the JACOB jar to my CLASSPATH, but JACOB requires the dll to be available in the java.library.path environment variable. Question : How can I add it in my maven build? EDIT I'm using maven 3 回答1: You probably have three possibilities for this use case MAVEN_OPTS You could use the MAVEN_OPTS