We're going to create a program that starts automatically and displays the path to the Word "startup folder". In order to do this, we're going to have to find out what the startup folder is.
Before you say, "Hey! You can just go to Tools > Options > File Locations tab and see what the startup folder is. You can also use the folder C:\Program Files\Microsoft Office\Office\Startup folder." I know that. We're doing it this way to learn how to code Word VBA programs.
First, start Word and then go to Tools > Macro > Visual Basic Editor. Click the Module option under the Insert menu. Enter this code. (Note that long lines are continued in most examples here. You can enter these lines without the continuation. I've continued them in the example code to keep the lines short.)
~~~~~~~~~~~~~~~~~~~~~~~~~
Public Sub AutoExec()
MsgBox ("The Word Startup Folder is: " _
& vbCrLf & Word.Application.StartupPath)
End Sub
~~~~~~~~~~~~~~~~~~~~~~~~~

