Installing Microsoft Office 2007 in 64-bit Linux Mint 18.1

I found it simple to install Office 2007 in Linux Mint under Wine. However, when I ran Word, intending to open an existing file, I immediately received the error message “Word cannot open this document template (C:\users\…\1033\Building Blocks.dotx)”. Ignoring this error, and continuing to try to open my file resulted in things going from bad to worse, with multiple messages about unreadable content, file errors, and features needing repair. I found this odd because I had previously installed and used the same package under Linux on an older laptop computer. It turned out that it was the new computer that was the problem!

Update – PlayOnLinux provides an easier – and more robust – installation method for Office 2007. See: Office 2007 and Wine Revisited

But first, a word about MS Office and Linux. Yes, I really do usually use the default LibreOffice suite of programs when using Linux. (In fact, I often use LibreOffice when I dual-boot into the Windows side of my system.) So, why would I want to install and use MS Office in Linux?

The fact is that LibreOffice and MS Office are not 100% compatible and, on occasion, I do have a need to work with “real” doc and xls files. It’s actually really easy just to boot into Windows when I intend to use Word or Excel. But, just suppose that I only want to use one of these programs briefly. Wouldn’t it make sense to be able to run the Windows program under Wine and not have to leave the Linux environment?

This whole situation came to a head recently when I wanted to access Word briefly – and quickly – only to find my Windows box “locked up” because Windows 10 was pushing a huge package of updates. This particular process literally prevented me from doing anything for quite some time. I couldn’t even load task manager to kill the running process!

So, my solution was to install an old copy of Office 2007 under Wine. But, as noted earlier, this wasn’t as simple as it seemed.

The problem transpired to be my installing Office 2007 on a relatively new, 64-bit computer. Office 2007 is a 32-bit application and, by default, Wine has trouble running this package on a 64-bit machine. As WineHQ’s FAQ listing states: “At present there are some significant bugs that prevent many 32 bit applications from working in a 64 bit wineprefix. To work around this, you can create a new 32 bit wineprefix using the WINEARCH environment variable.”

There are several web postings that indicate (more-or-less) how to do this. The two Terminal commands that worked for me in Linux Mint 18.1 are as follows:

(1) To create the new 32 bit wineprefix, WineHQ’s FAQ says to use the command:

WINEARCH=win32 WINEPREFIX=path_to_wineprefix winecfg

The parameter “path_to_wineprefix” may not be self evident. It is actually the path to the folder used as Wine’s (virtual) C: drive. It is very likely that this will be located in the hidden “.wine” folder in your home directory. It is also very likely that this folder will be named “drive_c”. In this case, the path to the default version of wineprefix will be /home/username/.wine/drive_c (where “username” will be your actual username.)

For my specific machine, the username is “toaster”, so my path to wineprefix is: /home/toaster/.wine/drive_c

Note that WineHQ tells us that we need to create a “new 32 bit wineprefix”. This means creating a separate folder for use by the 32-bit Office 2007. However, (a) we have to let Wine create this folder, and (b) it must be a new folder (i.e. with a name that doesn’t already exist. I opted to create a folder named drive_c32 and so used the command:

WINEARCH=win32 WINEPREFIX=/home/toaster/.wine/drive_c32 winecfg

(2) Now, I can install Office 2007. The following command tells Wine to use the newly created 32 bit wineprefix, and identifies the location of Setup.exe on a USBkey named SILICON16GB. (For the purposes of this installation I copied the files from the original Microsoft CD to a USB key since the target computer was not equipped with an optical drive.)

WINEPREFIX=/home/toaster/.wine/drive_c32 /media/toaster/SILICON16GB/office2007/Setup.exe

With Office 2007 now installed under Wine, navigating to Menu – Other on my system provides access to options to launch the constituent programs in the office suite. Word and Excel seem to work flawlessly. On the other hand, PowerPoint simply fails to launch. But, that’s a problem for another day.

References:

How do I create a 32 bit wineprefix on a 64 bit system
https://wiki.winehq.org/FAQ#How_do_I_create_a_32_bit_wineprefix_on_a_64_bit_system.3F

creating a 32 bit wineprefix on 64bit system?
http://askubuntu.com/questions/534110/creating-a-32-bit-wineprefix-on-64bit-system

Advertisements
This entry was posted in Applications, Commands, Installation, Mint, Windows, Wine and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s