Monday, 31 July 2017

Text in Microsoft Word does not Justify to Margins

I have no good solution to this.

In some Word documents the text refuses to go out to the margins. There are no hidden tables, no hidden forms, no hidden empty text boxes or white images. The text simply will not fill out the page. It can look like this:


The reason is probably corrupt formatting, when part of the text has been pasted from web pages with unexpected HTML.

The only solution I have found is to give up the document altogether. Select all the text and paste it in a new clean Word document with Edit > Paste Special > Unformatted Text. If you are brave, you can also try Edit > Paste and Match Formatting. That will bring over some of the original formatting, but hopefully not the corrupt data.

In either case, you will have to spend some time to polish the new document so it will look correct. 

The main advantage with the new document is that you can make the text look right. In the old corrupt document, it was impossible.

Update May 2021: Cumbersome workaround found.
  1. Create a new document with a dummy paragraph with correct formatting.
  2. Copy the dummy paragraph.
  3. Paste the dummy paragraph at the top of the corrupt document. It should keep the correct margins from the previous document.
  4. Remove the carriage return between the correct paragraph at the top, and the paragraph below. They will become one paragraph. It should get the correct margins.
  5. Use the enter key, to reinsert the carriage return. Now both paragraphs should have the correct margins.
  6. Repeat steps 4 and 5 for every paragraph in the corrupt document.
If it is a long document with plenty of paragraphs, this may not be worth it, but if it is a short document, it may be an acceptable solution.

Microsoft OneDrive Runs at High CPU on MacOS

If OneDrive takes all your CPU over an extended time, it may be a sync conflict, most likely caused by offline edits.

One way one can cause this problem is with the following steps:

  1. Create a file myFile.docx
  2. Create a file myNewFile.docx
  3. Sync.
  4. Go offline.
  5. Rename myFile.docx to my myOldFile.docx
  6. Rename myNewFile.docx to the first filename: myFile.docx
  7. Sync.
The fix was:
  • Remove all old versions of the file, like myOldFile.docx.
  • Sync all devices where the files had been synced, including phones and tablets.
Hint: If you do not know which file may cause this, look at possible conflicting OneDrive files in the Finder. If OneDrive integration is activated (System Preferences > Extensions > Finder > OneDrive Finder Integration), green and grey circles show the status of the files. Files that consistently show grey circles are probably problematic.




MacOS Spotlight Search Doesn't Work with MS Office documents

If you have problems with MacOS X Spotlight not finding content in MS Office documents, one possible error source is an obsolete file from previous installations of Microsoft Office:

/Library/Spotlight/Microsoft Office.mdimporter

Trashing this file may fix the problem. (Trashing it may cause other problems, but so do many things on computers.)