Launching Word with exec

I'm trying to open a file in Microsoft Word and I use:
Process m = Runtime.getRuntime().exec("winword.exe \"" + location + "README.doc\"");
which reports an exception.
Then I try:
Process m = Runtime.getRuntime().exec("cmd.exe /c winword.exe \"" + location + "README.doc\"");
which does nothing.
Thanks!

And what happens if you type "winword bozo.doc" (or whatever file) at the command line? You get this message:
"'winword' is not recognized as an internal or external command,
operable program or batch file."
Right?
That's what the exception means.
You could try this technique, which has been posted on these forums more than a couple of times:
Process m = Runtime.getRuntime().exec("cmd.exe /c start \"" + location + "README.doc\"");
You probably don't need the quotes, so leave them off if that works better. If you need more information on the Windows shell "start" command you could go to a command line and type "help start".

Similar Messages

  • Error launching Word with Robohelp for Word

    I have a test rack at work with a machine dedicated to Robohelp, which we just purchased and set up to replace our very old and outdated solution. It has Robohelp 8 on Windows 7, with Office 2007. Since the Robohelp installation, Word has consistent and constant crashes, giving an error claiming that Macros are required but unable to start. I entered the Trust Center in Word as instructed, and reset macros, but to no avail. Attempting to launch Word in Robohelp for Word causes an exception and error. Launching Word on its own also causes the same error. I've tried a Office repair, to no avail. Does anyone have any experience with this issue?

    I've know RoboHelp have issues finding Word or working with the wrong security settings. What I have not known it do is affect the running of Word when Word is run alone. For that reason, I think your problem is with Word.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • I want to launch Word with a button

    That's it !
    I want to launch Word inside firefox with a button on the toolbar.
    How can i do ?
    I inserted a "new button" browsing the word icon in the "image" request.
    but thbe icon does'nt appear.
    I have no idea for i must comlete in "code" request

    Try External Application Buttons mod for Firefox 3.0+: https://addons.mozilla.org/firefox/addon/12892

  • Launch Word documents in portal content

    Hello
    I would like to view my Word documents launching Word application inside content area. Is it possible?
    Thanks

    Need a simple application that access to the specific folder and create a list of link for all DOCs you wish.
    With JSP or WebDynpro java.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/using%20knowledge%20management%20functionality%20in%20web%20dynpro%20applications.pdf

  • Cannot launch Word, Excel or Quicken

    I recently updated to Mac OS 10.5 with an installation disk, then to OS X 10.5.6 via software update. I had some problems with the initial update, but they seemed to be resolved. Since the software update I am unable to launch Word, Excel or Quicken, my 3 most used applications. I get this message "the application "Word" cannot be launched because of a shared library error: "<Microsoft Word><CarbonLib<CFMPriv_LaunchServices>". Same thing with Excel and Quicken and a few less commonly used applications. I have searched these forums for answers and have tried a few things, but nothing has worked. Please help! Thanks!

    HI Marjorie,
    Information here for Troubleshooting shared library errors
    Carolyn

  • JOOLE launch IE with content

    Hi All,
    I'm using Hyperion 11 and I am struggling with launching IE with JOOLE but havign the content generated on the fly. I basically want to use it as a small help node (a coloured circle on a dashboard) popup that the user can click to see some help associated with that particular data entry field. I have the bits I need but unfortunatly not the technical expertise to assemble them into what I need.
    I can launch IE to a webpage okay:
    var ie = new JOOLEObject("InternetExplorer.Application")
    ie.Visible = true
    ie.navigate2("http://www.oracle.com")
    I can see how to have javascript populate an empty webpage on the fly, lots of examples on the old web but shorthand something to the effect off:
    newwin = open('url','newName’);
    newwin.document.write (‘html string to include’);
    I've trawleld my way through the Methods and properties avaliable in the microsoft msdn for IE:
    http://msdn.microsoft.com/en-us/library/aa752084(v=vs.85)
    But i just can't figure out how to integrate all the components together so that onclick JOOLE launches a new IE window sizes it to about 250 wide and 500 tall and populates the window with html on the fly.
    I could have Joole generate a html file and save it to something like C:/temp on the users machine and then load this in the browser but this will potentially leave an untidy temp file and I dont really need to permenantly save the file.
    Any help much appreciated (or alternate solutions, although i'm trying to avoid using notepad or word) or if I do figure it out i'll postback a reply with solution.
    thanks again

    Here's one solution to the problem I was having above (it is al little untidy but works), maybe someone else will find this handy in the future:
    var ie = new JOOLEObject("InternetExplorer.Application")
    ie.Visible = true
    ie.AddressBar = true
    ie.MenuBar = true
    ie.Toolbar = false
    ie.Width = 400
    ie.Height = 700
    ie.Left = 0
    ie.Top = 0
    ie.resizable = true
    ie.Navigate2("about:blank")
    ie.document.body.style.backgroundColor="#D5D2CA";
    ie.document.body.innerHTML="<html tag>Your html goes here</html tag>";
    If using inline css etc for styling you'll need \ any " marks.
    Edited by: 942217 on 26/06/2012 22:42
    Edited by: 942217 on 26/06/2012 22:43

  • When i use the apple tv it puts my computer to sleep.  the last time this happened i lost microsoft word with all the documents.  i'm asked to relaunch, but that step fails.  i'm frantic! can anyone help me see my documents again?

    when i use the apple tv it puts my computer to sleep.  the last time this happened i lost microsoft word with all the documents.  i'm asked to relaunch, but that step fails.  i'm frantic!  can anyone help me see my documents again? this also prevents me from reading attachments in my mail, since they are frequently launched in word.

    There's a whole lot to read in your post, and frankly I have not read it all.
    Having said that, this troubleshooting guide should help:
    http://support.apple.com/kb/TS1538
    In particular, pay attention to the mobile device support sections near the bottom, assuming you have already done the items above it.

  • Launch failed with error code -2857

    I've been running an app (EPSON Scan) for awhile without any significant problems. Today I check the Epson web site and they had an update for the app. So, I downloaded it, installed it, and tried to run it. Unfortunately, all I got was a couple of bounces in the Dock and nothing. I then went to the console and found the "launch failed with error code -2857" message. I've researched that as best I could and found that it is probably a problem with the application bundle. So, I opened the package, drilled down to the Mac OS folder, and double clicked on the EPSON Scan terminal command located there. Bing, a terminal window opened and the application launched and runs fine. So, the questions is, how do I resolve the CFM not finding the application correctly? I've run a pre-bind on everything but that didn't work. Seems to me like there is some config file that is not set up properly. I looked at the Info.plist file and I don't see any glaring problems. Any ideas? Epson also go a copy of this note...

    First I want to say thanks for the feedback. I appreciate the support and helpful suggestions.
    Second, Epson sent me an answer of sorts...they provided detailed instructions on uninstalling the application and then told me to reinstall using the disk image from their web site (in other words, don't use their web package to "update" and existing installation). I did this and things seem to be running fine now. It's unfortunate that their update instructions don't say to do this in the first place (maybe I missed it ).
    So at one level this issue is solved. Unfortunately I'm too curious and wanted to know why the error happend in the first place. As a software developer myself (mainframe and midrange server based) I hate the "delete and reinstall" answer as it does nothing to really identify and solve the real problem. But I do also appreciate the idea of "just get it fixed fast" so that's what I did.
    Anyway, I will now spend some time learning about Launch Services to see if I can get a more specific understanding of what happened.
    Thanks again for the help.
    24" iMac, 2GB Memory, etc   Mac OS X (10.4.8)   20" iMac, two MacBooks, one Dual Core Mac Mini

  • PAINFULLY SLOW launch times with MS Office 2004 Apps?

    Anyone else noticing painfully slow launch times with their MS Office 2004 Apps? It seems that each time I restart my machine and try to open any kind of office document the Word icon will bounce at least 15 times and then it takes forever for the application to actually launch. Once launched it seems fast and works fine, but not on initial launch after restart.
    Is this a Rosetta issue? Should I reinstall the MS Office apps?
    -JB

    Seems ok to me. Did you download the latest update which finally allows spotlight to search in Entourage and provide other improvements?
    http://www.microsoft.com/mac/downloads.aspx?pid=download&location=/mac/download/ office2004/Office2004_11.2.3.xml&secid=4&ssid=29&flgnosysreq=True
    "Microsoft Office 2004 for Mac 11.2.3 Update
    After you install this update, you can use Mac OS X Sync Services and Spotlight searches to sync and find Entourage items, use smart cards with Entourage 2004, and enjoy improved overall security and stability when using Microsoft Word 2004, Excel 2004, PowerPoint 2004, and Entourage 2004. This update also includes all of the improvements released in all previous Office 2004 updates.
    Applies to: Microsoft Office 2004 Standard Edition, Office 2004 Student and Teacher Edition, Office 2004 Professional Edition, Entourage 2004.
    Released: March 14, 2006"

  • I have Words with Friends app on iphone and game on computer.  When I try to play with Facebook friends message says" Account Already Connected.  This Facebook account has been connected to another user."  How can I play game on iphone or my pc?

    I have Words with Friends app on my iphone4S and the same game on computer.  When I try to play Words with Friends with Facebook on the iphone the  message says" Account Already Connected.  This Facebook account has been connected to another user."  It is connected to my computer. How can I play game on iphone?

    Hi Grandmaz5,
    If you are having issues connecting to Facebook on your iPad, and you have already troubleshot the Facebook app itself, you may want to check the built-in iOS settings for Facebook; you may find the following article helpful:
    iOS: Using Facebook, Twitter, and other social network accounts
    http://support.apple.com/kb/HT5500
    Regards,
    - Brenden

  • I am trying to download words with friends app and it says it is no longer available from itunes.  I had already downloaded it and did a update in my I phone 4 and it is still not letting me download it?

    I am trying to download words with friends and itunes is saying it is no longer available for purchase.  What is going on??I

    First you need to research all the problems people are having with the higher OSX versions, & make sure you have a bootable clone of what you have just in case.
    then you must get 10.6 if they still have it, install it & update to 10.6.8 so you have the App Store to buy & download the huge 10.8 Installer.
    Snow Leopard/10.6.x Requirements...
    General requirements
       * Mac computer with an Intel processor
        * 1GB of memory (I say 4GB at least, more if you can afford it)
        * 5GB of available disk space (I say 30GB at least)
        * DVD drive for installation
        * Some features require a compatible Internet service provider; fees may apply.
        * Some features require Apple’s MobileMe service; fees and terms apply.
    Which apps work with Mac OS X 10.6?...
    http://snowleopard.wikidot.com/
    It's been pulled from the online store & Apple Stores, so you have to call Apple to buy it, last I heard.
    Call Apple Sales...in the US: 1-800-MY-APPLE. Or Support... 1-800-275-2273
    Other countries...
    http://support.apple.com/kb/HE57

  • I am trying to use Words with friends on my iphone 5.  How do I get rid of   "Connect to itunes to Use Push Notifications

    I am trying to use Words with friends on my iphone 5.  How do I get rid of   "Connect to itunes to Use Push Notifications

    Reading some older threads from 2012 and 2011 it appears the problem was present even then.  Part of the problem was due to people using multiple or different account id's on the various devices.  In my case, I only have one ID and it is the same on all devices yet the iPhone and iPad are still throwing the same error when I try turning on iTunes Match.  This is very frustrating . . . any help out there?  Thanks.

  • I am getting a "invalid screenshot" when trying to upload the screen shot to a Words With Friends cheat app.  It just started doing this!

    I am getting a "invalid screenshot" when trying to upload the screenshot to a Words With Friends cheat application.
    What am I doing wrong?

    That was no help!  When playing with two grown daughters with high IQs,
    I need all the help I can get!

  • Firefox stops responding when I try to play words with friends, eventually a box pops up about script

    First, let me say I have the latest version of Firefox and Adobe Flash Player and Java Script. When I click to play Words With Friends (on pc) my computer starts racing and sounds loud and every thing freezes. If I try to click on slider or anything else, it says Mozilla Firefox (not responding), then it takes several minutes and a box pops up that says something about a script, do I want to continue or ?(I can't remember), after I click continue, I can play the game, but, at any given time Firefox will stop responding again!! A box also pops up from AVG saying that Firefox is using too much memory. Just an aside, I can play Scrabble on Facebook without any problems whatsoever. Please help, it is driving me crazy. Thanks

    Sounds that you are missing the plugin that is used to play those videos embedded in Firefox.<br />
    Your system details list doesn't show any media player plugin, so you will either have to check if the plugin(s) are installed, but disabled or install missing plugins.
    *https://support.mozilla.org/kb/Popular+plugins
    You may need the new WMP plugin (np-mswmp.dll) because Flash always uses a dedicated player to play the videos and would never offer to save videos directly unless an extension is used.
    * https://support.mozilla.org/kb/Using+the+Windows+Media+Player+plugin+with+Firefox
    * http://kb.mozillazine.org/Windows_Media_Player#Missing_plugin

  • I don't know how to go back to the original look of my Dashboard. I don't know what I did, but now when I click on it, my Words with Friends game comes up and that is all. How do I "reset" it to the original things on it?

    I don't know how to go back to the original look of my Dashboard. I don't know what I did, but now when I click on it, my Words with Friends game comes up and that is all. How do I "reset" it to the original things on it?

    Firefox 4 requires at least OS X 10.5 and an Intel Mac.
    * http://www.mozilla.com/firefox/4.0/system-requirements/
    You can look at:
    * http://www.floodgap.com/software/tenfourfox/
    Firefox 3.6.x can be found here:
    * http://www.mozilla.com/en-US/firefox/all-older.html

Maybe you are looking for