Ubuntu – How to install MS Office 2016 on PlayOnLinux

microsoft-officeplayonlinuxwine

How can I get playonlinux to install Microsoft Office 2016. The options from the install menu only go up to 2013.

Is there a more recent version of PlayOnLinux (or indeed Wine) I can download to enable installation of MS Office 2016?

The steps I take are:

  1. open PlayOnLinux
  2. click Install
  3. Click Office
    returns a list of several software packages including MS Office 2007, 2010 and 2013 (but alas not 2016)

Best Answer

I will provide directions that worked for me for a manual (non-script) installation of Microsoft Office 2016 Professional Plus on Ubuntu 18.04 using PlayOnLinux (POL) v4.3.4 and Wine x86 v3.4. All the apps except OneNote opens, though I have only really used Word and Excel so I can't speak for the functionality of the other apps.

PlayOnLinux with Office 2016 applications displayed

Firstly, try the default POL script and/or some of the other scripts here to check if they work because that would save you a lot of time and headache.

I tried the default script that comes with POL as well as some of the other scripts provided here but they became stuck (eg Office installation does not finish) or crashed at various points (eg "file not found" error). The below manual process essentially replicates those scripts and the advantage of this manual process is that you can see exactly where your specific setup might be encountering problems.

Parts of these instructions are based on GlasierXplor's POL forum post as well as other answers here.


Preparations

  1. Dependency installation: According to POL's website, wine:i386 needs to be installed. If you try to apt-get install wine:i386, it will fail because it is tied to 2 packages. On top of wine:i386, you will need smbclient and winbind for Office to start.

    • Note: DO NOT use --no-install-recommends to install wine-stable, as it will cause the Office installation to always crash due to some missing dependencies (didn't manage to pinpoint which packages).

    • sudo apt-get update

    • sudo apt-get install wine-stable:i386 smbclient winbind

    • smbclient -V #Confirms that smbclient is installed

    • winbindd -V #Confirms that winbind is installed

  2. Optional: Update POL to the latest version. This is because at one point POL gave an error indicating an update is needed and this error disappeared once I upgraded to POL v4.3.4. Here are the Ubuntu 18.04 (Bionic) instructions:

    • wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
    • sudo wget http://deb.playonlinux.com/playonlinux_bionic.list -O /etc/apt/sources.list.d/playonlinux.list
    • sudo apt-get update
    • sudo apt-get install playonlinux
  3. Optional: download the Office 2016 installation file if you don't already have it or have a CD. You can download it from MS using one of the below options. I assume you have downloaded the Office 2016 Pro Plus version in the rest of this answer.

  4. Optional: Install winetricks and mono. I received various errors relating to winetricks and mono from the scripts I tried previously so I had already installed these by the time I tried the manual installation. It is uncertain whether installing these made any difference so you could try the manual installation steps below first and then come back to this step if you encounter errors.

    • sudo apt-get install winetricks
    • winetricks dotnet45
  5. Optional: Remove previous unsuccessful installation of Office 2016 on POL. If your tried installing using the scripts, there may be POL Virtual Drives with empty or partial installations. You may want to remove these drives before trying the below installation process.

  6. Optional: Restart the computer just to be extra careful.

  7. Note In any situation where you use a multiple displays with your computer, Office will not display correctly if:-

    • Start Office with an additional display
    • Close Office
    • Disconnect any additional displays
    • Start Office

    Office will start with a maximum size restricted to the top left of your primary display, and will refuse to respect the size of your desktop, until you connect the "correct" number of displays again. In which case Office will act normally (subjective) again.

    E.g.

    • Install office with 2 displays
    • Start office with 3 displays
    • Close office and disconnect any number of displays (e.g. leave 1 display)
    • Start office again. Office will start in the top left of your primary display.
    • Connect 1 display to your computer (so now we have 2 displays).
    • Start office again. Office will still start in the top left of your primary display.
    • Office will only act properly if you connect the max number of displays you started Office in at any point of time (in this case 3 displays)

Setup POL

To consider: Wine x86 version 4.15 is more stable than 3.4 (below), or 3.14 (GlasierXplor's post on POL Forum). I.e. it does not crash randomly. The caveat is that there will be some issues with images, but should work fine 97~% of the time. Wine 4.15 requires the POL 4.3.4 update from the official POL repositories to be installed.

  1. Wine x86 version 3.4 was used for this installation so check if it is installed by starting POL and then selecting Tools -> Manage Wine Versions. Manage Wine Versions window with x86 version 3.4 installed

  2. If Wine x86 version 3.4 does not appear under "Installed Wine versions", then select it from the "Available Wine versions" window and click on the > in the middle to install it. Once installed, close and exit to the main POL menu.

  3. In POL, select Configure to enter the configuration screen and then click New in the bottom left to start the Virtual drive creator.

  4. Select 32 bits windows installation and press Next. Play On Linux 32 32 bits windows installation

  5. Select Wine version 3.4 and press Next.

  6. Give the virtual drive a name (eg Office2016pp) and press Next to start the creation. Select to install Mono if POL asks.

  7. Once the virtual drive creation is complete, you should be back in the main POL configuration screen. Ensure the newly created drive (eg Office2016pp) is selected on the left window.

  8. Click on the Install components tab at the top. Then scroll down to select msxml6 and click Install.

POL install component msxml6

  1. Repeat above step to install component riched20.

  2. Select the Wine tab in the POL Configuration screen and then click on Configure Wine.

  3. Once the Wine Configuration screen appears, click on the Libraries tab. Click Edit to change both msxml6 and riched20 to (native, builtin). Wine Configuration edit libraries

  4. In the Wine Configuration screen, click on the Applications tab and ensure that Windows 7 is selected as the Windows version. Exit to the POL configuration screen.

  5. Select the Wine tab in the POL Configuration screen and then click on Registry Editor to open the Registry Editor.

  6. Select to HKEY_CURRENT_USER->Software->Wine and

  7. Click Edit->New->Key and name this key Direct2D.

  8. Select Direct2D and then Edit->New->DWORD Value named max_version_factory with a value of 0.

enter image description here

  1. Close the Registry Editor and return to the POL Configuration screen.

Install Office

  1. Insert installation disk or mount the Office 2016 installation image file (eg ProPlusRetail.img). Double-clicking the image file on Nautilus should automatically mount it.

  2. In the Pol configuration screen, click on the Miscellaneous tab and click on Run a .exe file in this virtual drive to open the Select a file menu.

  3. In the Select a file menu, select Setup32.exe in the Office 2016 drive (eg in the Office folder) to start the Office 2016 installation process. Hopefully it will install properly and exit without any errors.

  4. Once the installation is complete, close the POL configuration screen to exit to the main POL screen.

  5. In the main POL screen, click Tools->Close all PlayOnLinux software.

  6. In the main POL screen, click Configure to go to the POL configuration menu and select Office2016pp (or whatever name you used) drive in the left hand.

  7. In the Pol configuration screen, click on the Miscellaneous tab and click on Open virtual drive's directory to open a new Nautilus ("Files") window.

  8. Using Nautilus go to folder drive_c/Program Files/Common Files/Microsoft Shared/ClickToRun/ and copy AppvIsvSubsystems32.dll and C2R32.dll to drive_c/Program Files/Microsoft Office/root/Office16/.

Nautilus ClickToRun folder view

  1. Close Nautilus and go back to the POL configuration screen.

  2. In the Pol configuration screen, click on the General tab and click on Make a new shortcut from this virtual drive to start the POL Wizard in order to create links to the Office apps.

POL create links to apps

  1. You will need to select the executable for each office app and name the link. Note that some of these apps (eg OneNote) may not work at all.

    • Select file WINWORD.EXE and name the link Microsoft Word 2016
    • Select file EXCEL.EXE and name the link Microsoft Excel 2016
    • Select file POWERPNT.EXE and name the link Microsoft Powerpoint 2016
    • Select file MSACCESS.EXE and name the link Microsoft Access 2016
    • Select file OUTLOOK.EXE and name the link Microsoft Outlook 2016
    • Select file ONENOTE.EXE and name the link Microsoft OneNote 2016
    • Select I don't want to make another shortcut to exit the wizard.
  2. Close the POL configuration screen to exit to the main POL screen. You should now see the apps you now linked to in the main POL screen.

PlayOnLinux with Office 2016 applications displayed

  1. Double click on MS Word inside POL to run it and you will be asked to activate Office. When complete, close Word and close POL.

  2. You should also find new .desktop files for each off the office apps on your desktop. You can copy or move these files using Nautilus into ~/.local/share/applications if you want them to appear in the Ubuntu dash and 'select application' menus.


Post-Instalation

  1. Optional: Insert categories into .desktop files. Edit each .desktop file and enter the Categories information to assist with searching. You can edit each file by right-clicking it -> Open with other Application -> Text Editor.

    • Microsoft Word 2016.desktop update Categories=Office;WordProcessor;
    • Microsoft Excel 2016.desktop update Categories=Office;Spreadsheet;
    • Microsoft Powerpoint 2016.desktop update Categories=Office;Presentation;
    • Microsoft Access 2016 update Categories=Office;Database;
    • Microsoft Outlook 2016 update Categories=Network;Email;
    • Microsoft OneNote 2016 update Categories=Office;WordProcessor;
  2. Optional: Update POL's extension file. Start POL and click Setting under Actions on the left side of the screen. Then associate the extensions and programs as shown below.

POL Extensions

  1. Optional: Set Office .desktop files as trusted to avoid the "Untrusted application launcher" warning. You only need to do this if it's causing problems.

    • Open a shell in ~/.local/share/applications and type:
    • gio set "Microsoft Word 2016.desktop" "metadata::trusted" yes
    • gio set "Microsoft Excel 2016.desktop" "metadata::trusted" yes
    • gio set "Microsoft Powerpoint 2016.desktop" "metadata::trusted" yes
    • gio set "Microsoft Access 2016.desktop" "metadata::trusted" yes
    • gio set "Microsoft Outlook 2016.desktop" "metadata::trusted" yes
    • gio set "Microsoft OneNote 2016.desktop" "metadata::trusted" yes
  2. Optional: Install Office 2016 updates. This is still a work in progress. Watch this post for updates.

Related Question