Will It Host? / Microsoft Word

Can you run a Minecraft server in Word?

It hosted#3 of 8 by difficulty

Yes. The process listening on port 25565 is WINWORD.EXE, and a vanilla Minecraft client connects to it and plays on it. The world is drawn on the page as an isometric render, and every block you place or break lands in the margin as a tracked change, so by the end the document is an edit history of a Minecraft session.

verdict
It hosted
A vanilla Minecraft client connected and played on it.
difficulty
#3 of 8
Ranked against everything else in the series, hardest first.
built withVBA
protocolMinecraft 1.8.9
read the source on github β†’

How it works

VBA, speaking the Minecraft 1.8.9 protocol over Winsock, driven by a Windows timer at 20ms because Word has no OnTime of its own. The world is a pool of 140 cube autoshapes floating over the page, moved and recoloured as you walk. Track Changes does the rest: block placements go in as tracked insertions, breaks as tracked deletions, and a Heading 2 is dropped for each new chunk you enter so the navigation pane fills up as you explore.

The part that nearly stopped it

The display surface and the document are the same object. With tracking on, building the shape pool would log 140 revisions before a client had connected, the status line would bury every real event under noise, and trimming old log lines would mark them deleted rather than removing them, so the document grew forever while getting slower. Word also reflows the page on every shape change, so the same render is slower here than in PowerPoint.

What got it over the line

Being deliberate about what Track Changes is allowed to see. The pool is built with tracking off and it is switched on only when the server starts; the status line updates untracked; and the log trim toggles tracking off, deletes, and puts it back. Only placements, breaks and chunk headings get recorded, which is why the margin reads as a build history rather than a diff.

What it cannot do

Minecraft 1.8.9, the same target as the rest of the series. The render is a 9x9 window around you rather than the whole world, breaking the original terrain is not reflected, and the log is capped at 30 lines because Word with hundreds of tracked revisions gets very slow.

Why this is possible at all

A Minecraft Java server is a smaller thing than its reputation suggests. It is a socket, a packet codec and a game loop. The client opens one TCP connection, sends a handshake naming its protocol version, moves through login into the play state, and from then on both sides exchange length-prefixed packets describing chunks, entities and movement. None of that needs a game engine. It needs something that can hold a socket open and put the right bytes on it in the right order, which is why Microsoft Word can be made to do it and why the interesting part of each episode is the host rather than the protocol.

Every build in this series targets Minecraft 1.8.9 for one specific reason. In 1.8 a chunk is a flat byte array you can send uncompressed. From 1.9 onward chunk data is palette-encoded into bit-packed longs and the connection expects zlib, which is not something you can hand-write in VBA. 1.8.9 is the last release where the whole protocol is within reach of a scripting runtime that was never meant for it.

We have written both halves of that up properly: how the Minecraft server protocol works covers the wire format, and what a Minecraft server actually needs to run covers the four things a real one cannot do without.

Questions

How do you run a Minecraft server in Word?

With VBA and Winsock, the same way as the Excel, Outlook and PowerPoint builds. Word macros can declare functions from ws2_32.dll, which is enough to listen on port 25565 and answer the Minecraft protocol packet by packet, with a Windows timer ticking the server every 20ms so Word stays responsive. The full source is on GitHub.

What does Track Changes have to do with it?

Word records changes to a document, so this build uses it to record changes to a world. Every block placed or broken is written into the document as a tracked revision with its name and coordinates, and each new chunk you enter gets a heading. Open the review pane and you are reading the session back.

The rest of the series

See the full Will It Host? board β†’

Or just host it properly

Microsoft Word is not where your survival world should live. AMD Ryzen 9700X, hard-reserved RAM, NVMe, online in under a minute with a free address, DDoS protection and a 7-day money-back guarantee.