How does a google choose it's autocomplete solution
In general, Google autocompletes (and produces search results) based on wide variety of factors, including (but not limited to) your location, your search history, your other Google accounts, your site visit history, your language settings, etc.

For the specific question, I see a few ways in which Google might have access to the relevant information:


If you are syncing your documents with Google Drive it will index the document that most recently changed (which would be the document you are writing) and it could analyze it for patterns to produce relevant search results and suggestions
If you emailed the document recently anywhere via Gmail it could also index the contents as above
Finally, if you are typing the document in Google Docs, it could also have access, but I assume by "Word" you mean Microsoft Word, so this is probably irrelevant in this case


I don't know specifically whether or not Google uses Drive or Gmail contents in the way described, but it would certainly make sense given that it is well known that they do use this information to target advertising.