Since you seem to have a working relationship with the proprietary software vendor, perhaps you can ask them how they are calling winword.exe to open the file. If they are simply making a system call to start winword.exe and passing it the name of the file to open, then all or most of the solutions I list below should work. I'll list the easiest ones first. If they are using COM or DDE, it is not impossible to intercept that, but will require considerably more work.
If they indicate that they are making a system call to start winword.exe (or if they won't tell you, just assume it may work and try it...):
- Go to the folder where LibreOffice Writer is installed. I am using OpenOffice instead of LibreOffice, but they are very similar, so you may have to do a little hunting/investigating.
- Find the "Writer" .exe file. For me (OpenOffice) it is:
D:\Program Files\OpenOffice.org-3\program\swriter.exe
- Make a copy of the "Writer" .exe file that you find and rename it to "winword.exe".
- Make sure it remains in the same folder as the existing "Writer" .exe file.
- Make sure the folder where this is found is named in the "Path" environment variable.
If you have any problems or questions with this process, just provide some details in a comment.
If the above does not work, you could try "Redirecting" the opening of Winword. Two possibilities to do this:
Method 1:
- Create a link to LibreOffice Writer. Name the link winword.lnk or winword.exe.lnk. This may depend on how the proprietary program calls Winword.
- Place the link file in a folder named in the "Path" environment variable.
Depending on the version of Windows you are using, there may be more than one type of link that can be created, and some may work in your case and others may not.
Method 2:
- Using a programming language that can compile to a ".exe" file (like C or Visual Basic), create a small "wrapper" program.
- The wrapper program simply accepts the command line arguments and calls LibreOffice Writer, passing the arguments.
- After compiling the wrapper, rename the .exe file created to winword.exe and place it in a folder named in the "Path" environment variable.
If you find none of these work, or if they tell you they use DDE or COM to invoke Winword, then both Visual Basic and C can be programmed to respond to DDE/COM messages/requests, although this is not a trivial task.
Edit:
You can view the "Path"
variable like this:
- Open a command prompt by clicking the Windows Start button (Start orb), then clicking the
"Command Prompt"
shortcut. If you don't see a "Command Prompt"
shortcut on the start menu then click in the "Search" box at the bottom of the start menu and type:
cmd.exe
Enter
- In the Command Prompt window, type:
C:>echo %Path%
C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem
C:>
This will display a string that is a list of folders separated by ";"
(semi-colons). The string displayed on your computer will be different.
If you cannot find your appropriate folder in the list of folders contained in the Path
variable, you can add folder names to the Path
:
- Click the Start button (orb)
- On the start menu, click
Computer
to open "My Computer"
, then click "System Properties"
from the context menu below the menu bar. Or, on the start menu, right click Computer
and select "Properties"
- On the left of the
"My Computer"
window, click "Advanced system settings"
- Click the
"Advanced"
tab.
Click the Environment Variables
button
From this little window that opens, you can add/edit/delete environment variables.
There are two types of environment variables. System variables
are available to all users on the computer. User variables
can be set to be different for each user.
The top half of the window is for managing User variables
, and the bottom is for managing System variables
. To manage variables for only the logged-in user, work in the User variables
section, otherwise work in the System variables
section.
If a variable has a value for both the System variables
and User variables
sections, then the value in the User variables
section will take precedence.
Variable names are not case sensitive, so a variable named "Path"
might be spelled "path"
or "PATH"
. Any way, it is the same variable.
Assume you want to edit the "Path"
in the System variables
section (which would be the usual case).
- In the
System variables
section, find the Path
variable, and click on it. Then click the Edit... button.
- If you do not find the
Path
variable (you most certainly will), you can click the New... button to add a new Variable and give it a name of Path
.
In the Edit System Variable
window, click in the "Variable value" field (textbox).
For the sake of safety, it would be a good idea to make a copy of the text (value) that is currently in the textbox and save it in a text file on your desktop.
Add a folder to the current Path
variable by moving to the end text in the textbox, then type a ;
(semi-colon), and then type the full path of the folder you want to add, and click the OK button.
So in your case, you might see the value of the Path
variable starts out looking something like this:
C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem
and after you have added the folder to the Path
variable it might look something like this:
C:\Windows\System32\;C:\Windows\;C:\Windows\System32\Wbem;D:\Program Files\LibreOffice\program\
You can now click the OK button to close the System Properties
window, and you can close the My Computer
window.
The environment variables are typically only read by programs when they start. So, any program that starts after you change the value of an environment variable, or add a new environment variable, or delete an environment variable, will usually see the environment containing the new (changed) values.
For programs that are already running, you may have to close and restart them, or reboot the computer before they see the new (changed) values.