Writing a simple office macro

The Commtap symboliser and Eye Gaze Communication Book Maker programmes use code (VBA – Visual Basic for Applications) which has been added to Microsoft Office. Virtually anyone with a Microsoft Office product can create VBA code. Here’s how.

  1. Close any open PowerPoint documents.
  2. Create a new PowerPoint document.
  3. Enable the “Developer” tab:
    • Right click on a blank space on the ribbon and choose “Customize the Ribbon…”.
    • In the list of Main Tabs on the right, scroll down to “Developer” and click on the box next to it to get a tick in it.
    • Click on “OK” at the bottom.
  4. Create some code:
    • Click on the “Developer” tab.
    • Click on “Visual Basic”.
    • In the menu on the left, right click on “VBAProject (Presentation1)” and go to Insert -> Module.
    • On the left, you will see “Module1” has appeared – double click on it.
    • In the white area on the right, type the following – exactly as it appears here:
Option Explicit
Sub MyCode()
  MsgBox "Hello everybody!"
End Sub
  1. Click on “MyCode”, then press “F5” or “fn” and “F5” together on your keyboard.

You should get a message box popping up saying “Hello everybody!”. Click on “OK” on the box to get rid of it.

Of course, this is just a very quick introduction to VBA. There are loads of sites and books which you can use to learn more.