By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,016 Members | 2,297 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,016 IT Pros & Developers. It's quick & easy.

Launch WinWord(Word) from incorrect directory

P: 2
I need WinWord to look like it's being executed from the correct path: C:\Program Files\Microsoft Office\Office12\WinWord.exe when in reality it's being launch from a Java app using the path C:\Program Files\Microsoft Office\Office11\WinWord.exe. A program (Java) from the Internet (so it only knows the configuration it has stored) launches 'C:\Program Files\Microsoft Office\Office11\Winword.exe' and sends it a macro to build a form on the client. Somehow I need to catch it and have it open winword from the correct path. Changing the path in the Java app isn't an option(unless someone is clever enough to trick it to the correct winword). I'm using visual studio 2008 Express C# but can download anything for free.

How do I do this?? Where do I start? I do SQL for a living not C#.

I've tried hardlinks 'fsutil hardlink create' but winword sees the Office11 in the path and launches Office Repair. I've tried copying the files in to an Office11 folder that I created which caused Office to launch repair. noticing a theme

I was thinking something like 'fork' or 'execlp' where Office11\winword(my app) launches Office12\winword and the ?data pipe? is inherited or parameters are passed to this real, M$, Office12\winword and runs the macro in M$ Word.

Thanks in advance for your help!
Aug 7 '09 #1
Share this Question
Share on Google+
2 Replies

Expert 5K+
P: 7,872
Does that java program interact with it once its been executed?
If not, it could be as simple as creating your own .NET program and putting it in that directory, then executing winword (like you suggested)

If it interacts with it, well then you might have some trouble.
Aug 11 '09 #2

P: 2
I don't believe the Java interacts with it. I don't know how to test that. The Java launches Winword and feeds it data. I don't know how it feeds Winword, named pipe, macro, from the command line, temp file, or maybe something like HTTPs get or put methods.

How do I test/capture/figure out the input method? What class/methods would I use to launch WinWord from .NET?

It's kind of like a mail merge between Access and Word. There are forms in the Java app. It usually knows how to fill in the form, Respondant's name and address, employer's address, etc. The Java app prompts for any fill-in fields that aren't in it's tables if any prompts are needed for the forms like a hearing date or respond by date. Then the user clicks ok and Winword opens with the addresses and dates filled in and the user clicks print and mails the letter.

Thanks for replying. I just about given up on getting a response.
Sep 8 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.