Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to use word Jacob operation in the implementation of

ActiveXComponent MsWordApp = new ActiveXComponent("Word.Application");



"Exception in thread "main" com.jacob.com.ComFailException: Can't get object clsid from progid"


mistakes appeared .

DLL files and jar package are's official website to download the latest


Who can tell me what reason be? Thank you very grateful!!
Posted
Updated 19-Dec-12 20:04pm
v3

At the risk of asking an obvious question, you do have a version of Word properly installed on this presumably development machine, dont you ?

btw - these might serve as quick tutorials on getting started :-

http://www.land-of-kain.de/docs/jacob/[^]

http://edn.embarcadero.com/article/33305[^]

'g'
 
Share this answer
 
v2
Comments
szyanbin 20-Dec-12 3:01am    
The office version is 2007
can you post your code ?

Please also make sure that jacob.dll is somewhere Windows can find it - as mentioned in one of those links I sent

What happens when you do something like :-

C#
try {
  LibraryLoader.loadJacobLibrary();
  ActiveXComponent oWord = new ActiveXComponent("Word.Application");
  oWord.setProperty("Visible", new Variant(true));
} catch (Throwable th) {
  th.printStackTrace(new java.io.PrintWriter(out));
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900