You Can Now Play DOOM In Microsoft Word, But You Probably Shouldn’t

DOOM used to primarily run on x86 PCs. It later got ported to a bunch of consoles with middling success, and then everything under the sun, from random embedded systems to PDFs. Now, thanks to [Wojciech Graj], you can even play it in Microsoft Word.

To run DOOM inside Microsoft Word, you must enable VBA macros, and ignore security warnings, to boot. You’ll need a modern version of Word, and it will only work on Windows on an x64 CPU. As you might imagine, too, the *.DOCM file is not exactly lightweight. It comes in at 6.6 MB, no surprise given it contains an entire FPS. It carries inside it a library called doomgeneric_docm.dll and the whole doom1.wad data file. Once the file is opened, a macro then extracts all the game data and executes it.

If you think that Microsoft Word doesn’t really have a way of displaying live game graphics, you’d be correct. Instead, that DLL is creating a bitmap image of the game state for every frame, which is then displayed inside Word itself. It uses the GetAsyncKeyState function to grab inputs from the arrow keys, number keys, and CTRL and space so the player can move around. It certainly sounds convoluted, but it actually runs pretty smoothly given all the fuss.

While this obviously works, you shouldn’t get in the habit of executing random code in your word processor. It’s just not proper, you see, like elbows on the dinner table! And, you know. It’s insecure. So don’t do that.

[Thanks to Josiah Gould for the tip!]

23 thoughts on “You Can Now Play DOOM In Microsoft Word, But You Probably Shouldn’t

  1. If you think that Microsoft Word doesn’t really have a way of displaying live game graphics, you’d be correct.

    How about something like document.Shapes.AddCanvas() and then drawing in that canvas with VBA? IIRC that’s how you could create animated images in Word.

    While this obviously works, you shouldn’t get in the habit of executing random code in your word processor. It’s just not proper, you see, like elbows on the dinner table! And, you know. It’s insecure. So don’t do that.

    I would like to see the same phrase in every article about yet another new online web tool. Just with “word pocessor” replaced with “browser”. Please.

    1. The whole point of a browser is to execute random code from the Internet. Sure, JS takes that to a whole other level, but (X)HTML has been abused too.

      And I’d rather my grandma use a browser with some guardrails than the wild west of downloading every exe on the planet to do stuff.

    1. Yes, it could technically run on any Office application should work. It’s a basic b64 encoding of the dll and was files, loaded as a pointer in the vba, and runs a function to clear the document, draw the frame to an image file, insert that image to the document, then release control back to word. Technically, clearing the document probably isn’t necessary with a static link to an image, but given the keystrokes are being listened to (from the dll as far as I can tell) but bubbled up, you’d end up with spaces moving things around constantly. Any application that supports InlineShapes class could run this, although you’d likely have to deal with the key inputs.

  2. Yall old people be like “can u run doom”

    Me and the people born in the 90s be like

    “can it run grand theft auto at max settings, 60fps minimum, with HD models, textures, opengl, and at 8-16msaa with mip mapping and custom shaders

    My Intel 64 bit with amd Fiji and 12gb of ram (12 gb because 1 of the 4 ram sticks died, yeah 4gb of over clocked at 2ghz, with the cpu running near 4ghz, and gpu running at 1.25ghz)

    I can run doom in 4k and get like hundreds of thousand fps. Because isometric rendering is really easy on a GPU, no actual 3d rendering, just a bunch of sprites and textures manipulated, GPU doesn’t need to draw polygons, just rotate, skew, and calculate distance and lighting of a bunch of 2d objects stored in memory

    I could run doom using a shader in my gpu

  3. Given enough time and effort you can pretty much run anything in VBA.

    With 3rd party DLL and subclassing, anything is possible. May not be practical.

    I remember many years ago building a basic web browser because the kiosk allowed the use Word and Excel but you had to “pay” for internet access.

  4. Somewhere out there on the DHS/USCG servers is a .xls file with a couple dozen Sega titles and pre 2010 flash games from the internet. Some nights when I was on watch that file was the only thing that kept me awake and sane. Learning to play Sonic 1 and Earthworm Jim with a keyboard was not easy but by God I did it.

    My OPS Lieutenant came in one night and caught me playing one of the games. I thought I was about to get chewed out. He looked back into the passageway, closed the door, and said “How the F*** are you doing that?” I showed him the file and all the tabs across the bottom with the different games. The some of the dirt simple scripts to get past the notorious hard spots. He then told me to move a copy to his public folder and tell no one. We both grew up in the 16 and 32 bit console era so it was an easy nostalgia dopamine hit.

    Occasionally I’d catch his eye in a meeting or on the bridge and get that subtle “thank you” nod and smirk.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.