I use a contruction like this:
#If EarlyBinding = 1 Then
Public objWord As Word.Application
Public objDoc As Word.Document
Public objMerge As Word.Document
#Else
Public objWord As Object
Public objDoc As Object
Public objMerge As Object
Public Const wdFormLetters = 0
Public Const wdMainAndDataSource = 2
Public Const wdMainAndSourceAndHeader = 4
Public Const wdSendToNewDocument = 0
Public Const wdDoNotSaveChanges = 0
#End If
Where EarlyBinding is a compiler option in the project properties
(Tools/Properties for ...). When I develop I use EarlyBinding = 1 and have a
reference to the, in this case, version of Word on my computer. You have all
the method and properties with intellisense at your disposal. When
delivering the app I erase the references and set the compiler option to
EarlyBinding = 0. And voila, no changes to the code because of the public
declarations (object and constants) and RUN!