DarkRoom Macros for Microsoft Word
Like me, you may write a fair number of articles and documents. Like me, you may also be constantly distracted by alerts, pings, toolbars, the temptation to ALT-TAB when you are writing. Recently, there have been a number of full screen editors that attempt to solve this. DarkRoom is an example of one of these, written in .NET it runs as a full screen editor and provides just enough functionality to allow you to concentrate on writing your masterpiece. While these utilities are useful, many only deal with .txt files, which can make working with existing Word documents difficult. I wanted to see if I could get a similar effect using a set of macros in Word to change colors, theme, and make the display full screen.
Here’s an example of two macros that I use to achieve a similar effect:
Sub DarkRoom()
‘
‘ DarkRoom Macro
‘
‘
ActiveDocument.Background.Fill.ForeColor.ObjectThemeColor = _
wdThemeColorText1
ActiveDocument.Background.Fill.ForeColor.TintAndShade = 0#
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid
ActiveWindow.View.FullScreen = Not ActiveWindow.View.FullScreen
End Sub
As you can see, the first macro changes the background and foreground colors of the document, and sets the display to full screen. This gives the white on black effect you can see in the video. The opposite macro for this is aptly called LightRoom:
‘
‘ LightRoom Macro
‘
‘
Selection.EscapeKey
ActiveDocument.Background.Fill.ForeColor.ObjectThemeColor = _
wdThemeColorBackground1
ActiveDocument.Background.Fill.ForeColor.TintAndShade = 0#
ActiveDocument.Background.Fill.Visible = msoTrue
ActiveDocument.Background.Fill.Solid
End Sub
This simulates pressing the escape key (to restore the ribbon) and resets the document colors appropriately.
I assign these macros to ALT-D and ALT-L respectively to give me a quick way of switching between two displays when writing. I’ve not tried this on Word 2003 (I’m using Word 2007), but I can’t see why it shouldn’t work. If I have some more time, I may extend this by selecting a custom theme (maybe green on black Consolas instead of the automatic default) and hooking into the Windows task bar to make that disappear also.

I get the below error when the Macros hits this line of code in the DarkRoom sub:
ActiveWindow.View.FullScreen = Not ActiveWindow.View.FullScreen
Any ideas?
—————————
Microsoft Visual Basic
—————————
Object variable or With block variable not set
—————————
OK Help
—————————
Not sure – are you using Word 2003 or 2007? As I mentioned, I haven’t tested on 2003 yet.
Thanks,
-Simon
How can search begining of the line in ms word by using macro coding?
How can get the current line number and end of the line number in ms word by using macro coding?
I’m not seeing how to change the background & text colors to match what you’ve got in your brief screencapture. I get a white screen with black text in DarkRoom mode.
Do I need to create a special theme to support this as well?