Interacting with MS Word through Java

Hi friends,
How to interact with a MS Word file through the java program. please send me some sample codes. Thanks in advance.....
Regards,
Prakash.....

Prakashjava wrote:
Hi friends,
How to interact with a MS Word file through the java program. please send me some sample codes. Thanks in advance.....
Can't be done in pure Java.

Similar Messages

  • Interaction with Microsoft Word using Java Programming

    writing Text ON TO MICROSOFT WORD USING java Programming Urgently required

    Go throuh jakarta POI(hssf) to do..No! HSSF which stands for Horrible SpreadSheet Format can be used for Excel (spreadsheets as the name suggests). For Word, you would need to lok at HPSF.

  • Problem in Interacting with Weblogic JMS through Informatica ETL server

    Hi All,
    We are trying to configure Informatica PowerCenter server to interact with JMS queues created on Weblogic 11gR1 server. We have copied the necessary
    jar file - wlfullclient.jar to the classpath of the Informatica server.
    Now when i try to read contents of a JMS queue created on Weblogic server through Informatica, i get this error:-
    Failed to get the Queue Connection Factory [weblogic.jms.common.DestinationImpl]. Reason: Failed to look up object [While trying to lookup 'weblogic.jms.common.DestinationImpl' didn't find subcontext 'common'. Resolved 'weblogic.jms'Exception Stack: javax.naming.NameNotFoundException: While trying to lookup 'weblogic.jms.common.DestinationImpl' didn't find subcontext 'common'. Resolved 'weblogic.jms' [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'weblogic.jms.common.DestinationImpl' didn't find subcontext 'common'. Resolved 'weblogic.jms']; remaining name 'common/DestinationImpl'
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:464)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:272)
         at weblogic.jndi.internal.ServerNamingNode_1211_WLStub.lookup(Unknown Source)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:418)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:406)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at com.informatica.powerconnect.jms.server.common.JNDIConnection.getJNDIObject(JNDIConnection.java:84)
         at com.informatica.powerconnect.jms.server.common.PlginJMSConnection$PlginJMSQueueConnection.createConnection(PlginJMSConnection.java:363)
         at com.informatica.powerconnect.jms.server.common.PlginJMSConnection.<init>(PlginJMSConnection.java:90)
         at com.informatica.powerconnect.jms.server.common.PlginJMSConnection$PlginJMSQueueConnection.<init>(PlginJMSConnection.java:352)
         at com.informatica.powerconnect.jms.server.common.PlginJMSConnection.create(PlginJMSConnection.java:115)
         at com.informatica.powerconnect.jms.server.reader.JMSReaderSQDriver.createPartitionDriver(JMSReaderSQDriver.java:557)
    Caused by: javax.naming.NameNotFoundException: While trying to lookup 'weblogic.jms.common.DestinationImpl' didn't find subcontext 'common'
    I have checked that this class file exists in the above said location :- "weblogic/jms/common/DestinationImpl.class" within the wlfullclient.jar but still the
    code is not able to access the class. Similar error came initially while doing JNDI connection using "weblogic.jndi.WLInitialContextFactory" class but it vanished,
    when i explicitly named the jar file on classpth, instead of just the folder containing the jar file.
    To all the users/experts/moderators of Weblogic - Could you please help me understand why Weblogic is not able to look up subcontext 'common'
    for the class - "weblogic.jms.common.DestinationImpl" ??
    Thanks & Regards
    Raj
    Edited by: user8931188 on May 17, 2012 7:39 AM

    You are experiencing a NameNotFoundException, not ClassNotFoundException so it seems there is something wrong about the client connection code or WebLogic config.
    Can you share your client connection connection config/code?

  • Interact with indesign javascript through Jtree

    i can display indesign script files in tree view. what is my question is if i click the indesign javascript file i want
    to execute. that means i want to interact with java swing to indesign cs3. How it is possible could anyone tell me.

    Welcome to the Sun forums.
    >
    i can display indesign script files in tree view. what is my question is if i click the indesign javascript file i want
    to execute. that means i want to interact with java swing to indesign cs3. How it is possible could anyone tell me.>About the only way you will be able to get interaction between a JTree and JavaScript is to put the JTree in a JApplet and put that applet in a web page that also references the scripts.
    As far as Java/JS interaction go, look to [Real's HowTo|http://www.rgagnon.com/howto.html] (<- link) and the categories 'Java|JavaScript Interaction' & 'JavaScript|Interaction with Java'.
    Testing will be a hassle, since the AppletViewer does not support Java/JS interaction and browsers cache the classes. Not that applet development is not a PITA to start with.
    And a few points before closing:
    - All sentences should start with a single upper case letter. This helps the reader to quickly scan text, looking for ways they can help. You would not want to make it harder for people who are trying to help, would you?
    - The word 'I' should be always upper case, always.
    - ..and it is JTree, not Jtree. Please be very careful with class names so we can all be sure you refer to J2SE classes, and not some 3rd part class about which we know nothing and do not support.
    Edited by: AndrewThompson64 on Jul 6, 2009 9:19 PM

  • Cannot Interact with Microsoft Word 2008 for Mac after Opening

    After I open Microsoft Word 2008 for Mac, either by opening a .docx file or opening Word from the Applications folder, I am not able to interact with the application whatsoever.  Selecting its icon in the dock does not bring any of its windows to the front, nor does it show the Word menu at the top; instead, it still shows the menu of whatever application was previously selected.  But the windows do exist if I move other windows out of the way.  If I do get to a Word window, I cannot click on anything, select anything, resize it, close it, or scroll.
    Other info: If I click and hold the Word icon in the doc, the menu displays as if the application were functioning normally; it does not show a Force Quit option, as it would if Word were frozen.  I do not see any dialogue boxes or anything that would take the focus away from the other windows.
    Background: I was able to successfully use Word without any problems before today, using the same installation of the application, same computer, and same operating system. I also never had this problem before Mavericks, though, as I said before, I didn't always have this problem in Mavericks.
    How do I get Word to function normally again?  Thanks for any help you can provide!

    After letting Word run for quite a while, a popup window told me there was an issue with the database.  I opened the Microsoft Database Utility and rebuilt the database.  It seems to be working fine now.

  • Issue with passing parameters through Java-JSP in a report with cross tab

    Can anyone tell me, if there's a bug in Java SDK in passing the parameters to a report (rpt file) that has a cross tab in it ?
    I hava report that works perfectly fine
       with ODBC through IDE and also through browser (JSP page)
    (ii)    with JDBC in CR 2011 IDE
    the rpt file has a cross tab and accpts two parameters.
    When I run the JDBC report through JSP the parameters are never considered. The same report works fine when I remove the cross tab and make it a simple report.
    I have posted this to CR SDK forum and have not received any reply. This have become a blocker and because of this our delivery has been postponed. We are left with two choices,
       Re-Write the rpt files not to have cross-tabs - This would take significant effort
    OR
    (ii)  Abandon the crystal solution and try out any other java based solutions available.
    I have given the code here in this forum posting..
    CR 2011 - JDBC Report Issue in passing parameters
    TIA
    DRG
    TIA
    DRG

    Mr.James,
    Thank you for the reply.
    As I stated earlier, we have been using the latest service pack (12) when I generated the log file that is uploaded earlier.
    To confirm this further, I downloaded the complete eclipse bundle from sdn site and reran the rpt files. No change in the behaviour and the bug is reproducible.
    You are right about the parameters, we are using  {?@Direction} is: n(1.0)
    {?@BDate} is: dt(d(1973-01-01),t(00:00:00.453000000)) as parameters in JSP and we get 146 records when we directly execute the stored procedure. The date and the direction parameter values stored in design time are different. '1965-01-01' and Direction 1.
    When we run the JSP page, The parameter that is passed through the JSP page, is displayed correctly on the right top of the report view. But the data that is displayed in cross tab is not corresponding to the date and direction parameter. It corresponds to 1965-01-01 and direction 1 which are saved at design time.
    You can test this by modifying the parameter values in the JSP page that I sent earlier. You will see the displayed data will remain same irrespective of the parameter.
    Further to note, Before each trial run, I modify the parameters in JSP page, build them and redeploy so that caching does not affect the end result.
    This behaviour, we observe on all the reports that have cross-tabs. These reports work perfectly fine when rendered through ODBC-ActiveX viewer and the bug is observable only when ran through Java runtime library. We get this bug on view, export and print functionalities as well.
    Additionally we tested the same in
        With CR version 2008 instead of CR 2011.
    (ii)   Different browsers ranging from IE 7 through 9 and FF 7.
    The complete environment and various softwares that we used for this testing are,
    OS      : XP Latest updates as on Oct 2011.
    App Server: GlassFish Version 3 with Java version 1.6 and build 21
    Database server ; SQL Server 2005. SP 3 - Dev Ed.
    JTds JDBC type 4 driver version - 1.2.5  from source forge.
    Eclipse : Helios along with crystal libraries directly downloaded from SDN site.
    I am uploading the log file that is generated when rendering the rpt for view in IE 8
    Regards
    DRG

  • Issue with sending mail through java stored procedure in Oracle

    Hello
    I am using Oracle 9i DB. I created a java stored procedure to send mail using the code given below. The java class works fine standalone. When its run from Java, mail is sent as desired. But when the java stored procedure is called from pl/sql "Must issue a STARTTLS command first" error is thrown. Please let me know if am missing something. Tried the same code in 11.2.0.2 DB and got the same error
    Error:
    javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first. va6sm31201010igc.6
    Code for creating java stored procedure: (T1 is the table created for debugging)
    ==================================================
    create or replace and compile java source named "MailUtil1" AS
    import java.util.Enumeration;
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public class MailUtil1 {
    public static void sendMailwithSTARTTLS(String host, //smtp.projectp.com
    String from, //sender mail id
    String fromPwd,//sender mail pwd
    String port,//587
    String to,//recepient email ids
    String cc,
    String subject,
    String messageBody) {
    try{
    Properties props = System.getProperties();
    props.put("mail.smtp.starttls.enable", "True"); // added this line
    props.put("mail.smtp.host", host);
    props.put("mail.smtp.user", from);
    props.put("mail.smtp.password", fromPwd);
    props.put("mail.smtp.port", port);
    props.put("mail.smtp.auth", "true");
    #sql { insert into t1 (c1) values ('1'||:host)};
    Session session = Session.getDefaultInstance(props, null);
    MimeMessage message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    #sql { insert into t1 (c1) values ('2')};
    InternetAddress[] toAddress = new InternetAddress[1];
    // To get the array of addresses
    for( int i=0; i < toAddress.length; i++ ) { // changed from a while loop
    toAddress[i] = new InternetAddress(to);
    //System.out.println(Message.RecipientType.TO);
    for( int i=0; i < toAddress.length; i++) { // changed from a while loop
    message.addRecipient(Message.RecipientType.TO, toAddress);
    if (cc!=null) {
    InternetAddress [] ccAddress = new InternetAddress[1];
    for(int j=0;j<ccAddress.length;j++){
    ccAddress[j] = new InternetAddress(cc);
    for (int j=0;j<ccAddress.length;j++){
    message.addRecipient(Message.RecipientType.CC, ccAddress[j]);
    message.setSubject(subject);
    message.setText(messageBody);
    message.saveChanges();
    #sql { insert into t1 (c1) values ('3')};
    Enumeration en = message.getAllHeaderLines();
    String token;
    while(en.hasMoreElements()){
    token ="E:"+en.nextElement().toString();
    #sql { insert into t1 (c1) values (:token)};
    token ="ConTyp:"+message.getContentType();
    #sql { insert into t1 (c1) values (:token)};
    token = "Encod:"+message.getEncoding();
    #sql { insert into t1 (c1) values (:token)};
    token = "Con:"+message.getContent();
    #sql { insert into t1 (c1) values (:token)};
    Transport transport = session.getTransport("smtp");
    #sql { insert into t1 (c1) values ('3.1')};
    transport.connect(host, from, fromPwd);
    #sql { insert into t1 (c1) values ('3.2')};
    transport.sendMessage(message, message.getAllRecipients());
    #sql { insert into t1 (c1) values ('3.3')};
    transport.close();
    #sql { insert into t1 (c1) values ('4')};
    catch(Exception e){
    e.printStackTrace();
    String ex= e.toString();
    try{
    #sql { insert into t1 (c1) values (:ex)};
    catch(Exception e1)
    Edited by: user12050615 on Jan 16, 2012 12:18 AM

    Hello,
    Thanks for the reply. Actually I have seen that post before creating this thread. I thought that I could make use of java mail to work around this problem. I created a java class that succesfully sends mail to SSL host. I tried to call this java class from pl-sql through java stored procedure. That did not work
    So, is this not supported in Oracle ? Please note that I have tested this in both 9i and 11g , in both the versions I got the error. You can refer to the code in the above post.
    Thanks
    Srikanth
    Edited by: user12050615 on Jan 16, 2012 12:17 AM

  • Communicate with ICF services through java(servlet)

    hello,
    i'm trying to interrogate an ICF webservice through jsp , but it doesn't work .
    i can't interrogate the webservice through ajax (xml httprequest) since it's a not a cross-domain object.
    so i'm pushed to use a servlet as proxy to retreive de xml result from the ICF webservice .
    is there some kinda restriction when you call the icf webservice from a serverside language ..?
    or a special API ?
    looking forward to receiving help

    - When we are logging in to Oracle cloud on browser and execute the Oracle cloud RESTful service in another tab of same browser, we are able to get the result. But when executed the same RESTful service from a different browser or java program we get internal server error.
    - After investigation, we found that when user logs in to oracle database cloud, a cookie is set in browser with name s “OAMAuthnCookie_cstest-domo.db.us1.oraclecloudapps.com:443” and value as some random token. This cookie is passed in the subsequent requests to the RESTful Service calls when using same browser and as a result, we are able to get the results
    - In the Java program, we copied the same cookie with random token in the HTTP Request header and we got the proper response from REST APIs.
    - It seems that this cookie is created by an Oracle Middleware tool/server called as OAM – Oracle Accounts Manager, which sends the authentication token after successful authentication and creates the cookie.
    - We found that the cookie that OAM creates on authentication is exactly in the same format i.e. ‘OAMAuthnCookie_cstest-domo.db.us1.oraclecloudapps.com:443’. So, we are guessing that Oracle cloud uses OAM for authentication. Please refer to following link for same : http://docs.oracle.com/cd/E14571_01/doc.1111/e15478/sso.htm
    Can anyone please suggest:
    1.     How to provide authentication to Oracle Cloud REST APIs from java program?
    2.     How to pass the username and password in Java code to OAM (or how to communicate with OAM using Java) so that we can receive the unique token from OAM. We can use the token in the further requests? 3.     Also in Oracle cloud white papers , it is mentioned that they support OAuth2.0. But we didn’t find any URLs for same. Can anyone please confirm?
    Thanks
    ~ Neeraj Girolkar

  • Problem with socket connection through Java Embedding...

    We are trying to create a simple socket connection to a socket server through BPEL PM using the Java Embedding component.
    BPEL Process : Client makes an asynchronous request. Passes an input variable. The input variable is sent to the Server Program through a socket connection through the Java embedding component.
    Server: We are running a simple Socket Server program from command prompt.
    The code below works fine as long as we do not try to receive a response from the server (Commented Code).
    If we uncomment the code and try to receive a response, it refuses to create an instance for the BPEL Process. And sometimes restarts the BPEL Server.
    Client Code:
    String msg="NONE";
    try{
    org.w3c.dom.Element input = (org.w3c.dom.Element) getVariableData("inputVariable","payload","/client:clientProcessRequest/client:input");
    msg = input.getNodeValue();
    Socket clientsoc=new Socket("ServerIP",1000);
    PrintWriter out1=new PrintWriter(clientsoc.getOutputStream());
    out1.write(msg);
    out1.flush();
    BufferedReader cin1=new BufferedReader(new InputStreamReader(clientsoc.getInputStream()));
    msg=cin1.readLine();
    setVariableData("outputVariable","payload","/client:result",new String(msg));
    clientsoc.close();
    catch(UnknownHostException e)
    System.err.println("Don't know about host: dev.");
    System.exit(1);
    catch (IOException e)
    System.err.println("Couldn't get I/O for "+ "the connection to: dev.");
    System.exit(1);
    }

    Repost

  • How to open other programs (Say MS Office word ) through java code.

    Hi,
    Scenario is...
    When we click a button i need a new (blank) word document to be opened (in MS office).
    MS office is just for an example. It can be acrobat reader,winamp,windows media player
    If you dont know the way to do this, please dont post "It is not possible".
    Thank you
    Ashish P.J

    ofcourse by using "process" and "runtime" and "exec" i can open a notepad,calc....
    exec(notepad);
    exec(calc);but what about excel? or word or other applications...
    exec(excel);wont open a blank excel sheet
    even if i give the path to excel(C:\Progarmfiles\.....what ever)

  • Is there any other way to view and interact with notes except through Mail?

    Using the iPad I really like using notes as a stand-alone app. Is there a way to do this in OSX or can I only access my notes through Mail?
    If only through mail, can they live someplace other than my inbox?
    Thanks

    To not have them in your inbox, go to Mail Preferences ->Accounts->Mailbox Behaviours then uncheck the box that says 'show notes in inbox'.
    There are other 3rd programs that can manage your notes, but Mail is the only native OSX app that does that.
    Message was edited by: bman99

  • Can oracle database interact with sysbase database in real-time?

    There are two database,one is oracle,one is sysbase,sysbase is produce database.My program only can visit oracle database,and can't directly visit sysbase database.My question is whether there is a directly link from oracle database to sysbase database,when I visit oracle,oracle database can interact with sysbase database through this link real time? How to realize above function? Please give plan for it.
    Thanks in advance!
    Best regards,
    Edward

    Yes there is. You have to create heterogeneous connection between these two databases
    Take a look at below links:
    http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:13401716754850
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96571/repmultdemo.htm

  • Is there a VI availible that will allow one to interact with an analog signal

    Hello all,
     I am new to the sight and look forward to participating. I have a project that I’m working on and I would like to ask for your thoughts and direction if you’re willing. I have a few weeks left before completing an electronics program degree and Labview is one of the classes. The project I have chosen is to illustrate the differences between a micro controlled system and Labview controlled environment. I will be  acquiring a signal through a ultra sonic distance sensor. The analog signal will be produced after which  acquired  through a SCB – 68 connector block and converted using the pci-mio-16E. The sensor operates at 40 kHz emitting a 5v pulse (burst) then falling to gnd for a short period followed by a 5v rise and staying high for a period of time waiting for the return of the frequency. This time period represents 3 inches to 27 ft in distance.  I would like to interact with this signal through the distance period (portion) and output a string displaying a numeric value of the distance on the front panel obtained from an array built from different periods of the signal.  I am not clear on what Labview function offers this type of control.  I am hopeful in utilizing a vi or some type of trigger that allows me to build an array produced by some math functions.  Any help would be appreciated.
    Thank you, dhitch

    First thank you for your response, I will have an opportunity to make a capture tomorrow in class.  I believe I have run across the waveform measurement VI in my searches and am sure it’s a very good choice. The trigger VI you suggest, going by the name, should be my ticket. Would you imagine a delay or decreasing time after the capture, allowing the trigger VI time to respond to an output configuration be required?
    If I remember correctly the sampling rate capabilities are 500K samples/ second with 12 bits of resolution and as I say that it seems some of the capabilities rely on the processing speed of the computer. I guess I will kick the tires tomorrow hey.  There are 2 class periods remaining to finish our projects @ 2 hrs / class and my anxiety is a bit high. Wish me luck and thank you so much.
    dhitch

  • Interaction with operating system

    Hi!
    I want to know how shuold i interact with operating system using java.Actually i m implementing speech to text converter and for that i want to use control panel of windows. so please tell me how i can interact with operating system.
    Regards

    Use either the methods of the Runtime class or use JNI (Java-Native-Interface)
    There are many examples of each, and JNI has a separate forum, Native Methods. Search both Sun documentation and the forums.

  • I am having problems interacting with Microsoft Office programs since the last update:cannot create a pdf through the 'print' menu in exel and both Word and Exel docs sent in Mac Mail end up being received as .dat files.

    I am having problems interacting with Microsoft Office programs since the last update:cannot create a pdf through the 'print' menu in exel and both Word and Exel docs sent in Mac Mail end up being received as .dat files.
    Both these situations have cropped up on my MacBook Pro since the last update.
    Thanks for your help.
    Cheers
    Bob

    The 'Winmail.dat' problem has been extensively covered in these forums, I would search for that (a Google search works well) and unfortunately I have not seen the pdf print problem before, but assuming the software is current and functions normally (other than the pdf print problem) I have no suggestion other than the obvious (but time consuming) re-installation of Office.
    I wish I had more

Maybe you are looking for

  • IPhone 4 slow after updating to iOS 5.1

    I have a 32GB iPhone 4 with about 2GB free and recently updated to iOS 5.1.  It has become noticeably slower since updating it.  There are some short delays with certain apps, some have become jerky and the Home button isn't as sensetive as it used t

  • Inventory management - Moving to SAP WM - Next Steps

    Hi All WM experts, Currently we have our Stock managed via inventory mangement(SAP IM module - Storage location level). We are planning to implement SAP WM ( SAP Warehouse Management Module )very soon. What are the next steps in terms of transferring

  • Photoshop CS3 10.0.1 launch hangs while Initializing menus

    Can anyone please help me? Everything was fine yesterday, then today CS3 blew up. When I click to launch Photoshop CS3 Extended the application panel displays and starts listing what it's loading. Every time it reaches "Initializing menus..." the app

  • Development version database

    We are going to refresh DEV from PRD and want to use note 130906 to backup the version database. Two questions regarding this: 1) Will PRD active version be replaced if the current version is not the same? Let me say program ZABC on DEV has version 1

  • Pin to start hotmail

    Hi, I'm a new Lumia user. I played with rearranging the tiles on the start site when I incidentally unpinned the 'envelope' tile, which I guess stands for email or outlook or hotmail or sth like that. Now, I can't revert to the previous state because